Click or drag to resize
Game Class
Core game class. Provides default functionality that is common across many games, such as components that are attached to entities, or systems working on these components.
Inheritance Hierarchy
SystemObject
  Slash.Application.GamesGame

Namespace: Slash.Application.Games
Assembly: Slash.Application (in Slash.Application.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class Game

The Game type exposes the following members.

Constructors
  NameDescription
Public methodGame
Constructs a new game without players.
Top
Properties
  NameDescription
Public propertyAddSystemsViaReflection
Indicates if game systems should be added which are flagged with the GameSystem attribute.
Public propertyBlueprintManager
Manages all blueprints available in the game.
Public propertyEntityManager
Manager responsible for creating and removing entities in this game.
Public propertyEventManager
Manager allowing listeners to register for game-related events.
Public propertyGameName
Name of this game.
Public propertyLog
Logger for logic events.
Public propertyProcessManager
Manager allowing ticking and queueing timed processes.
Public propertyRunning
Whether this game is running, or not (e.g. not yet started, paused, or already over).
Public propertySystemManager
Manager responsible for updating all game systems in each tick.
Public propertyTimeElapsed
Total time since this game has started, in seconds.
Public propertyUpdatePeriod
Fixed time between two game ticks (in sec).
Top
Methods
  NameDescription
Public methodAddSystemT
Adds and initializes the system of the specified type.
Protected methodOnGameStarted
Called after initialization of game was done and the game was started.
Public methodPauseGame
Pauses this game, stopping ticking all systems.
Public methodResumeGame
Resumes this game, continuing to tick all systems.
Public methodStartGame
Starts this game, beginning to tick all systems.
Public methodStartGame(IAttributeTable)
Starts this game, beginning to tick all systems.
Public methodStopGame
Deinitializes and stops the game.
Public methodUpdate
Ticks this game, allowing all systems to update themselves and processing all game events.
Top
Extension Methods
  NameDescription
Public Extension MethodCreateEntities
Searches for the blueprints with the specified ids and creates entities out of it. If the blueprints are used several times, consider to fetch them from the game's blueprint manager once and use them to create the entities.
(Defined by GameBlueprintUtils.)
Public Extension MethodCreateEntity(String)Overloaded.
Searches for the blueprint with the specified id and creates an entity out of it. If the blueprint is used several times, consider to fetch the blueprint from the game's blueprint manager once and use it to create the entities.
(Defined by GameBlueprintUtils.)
Public Extension MethodCreateEntity(String, AttributeTable)Overloaded.
Searches for the blueprint with the specified id and creates an entity out of it. If the blueprint is used several times, consider to fetch the blueprint from the game's blueprint manager once and use it to create the entities.
(Defined by GameBlueprintUtils.)
Public Extension MethodCreateEntity(Blueprint, AttributeTable)Overloaded.
Searches for the specified blueprint and creates an entity out of it.
(Defined by GameBlueprintUtils.)
Top
See Also