TriEngine
v0.0.16
General-purpose engine in C#/OpenGL
|
A game state that can be used with the game state manager. Represent a specific state of the game, like main menu and options screen. More...
Public Member Functions | |
void | Load () |
Loads resources associated with this game component. More... | |
void | Unload () |
Unloads resources that were loaded in the Load method. More... | |
void | Pause () |
Pauses the game state, preventing update calls from running. More... | |
void | Unpause () |
Unpauses the game state, enabling update calls again. More... | |
IGameComponent | AddComponent (IGameComponent component) |
Adds a game component to this game state. More... | |
void | RemoveComponent (IGameComponent component) |
Removes the specified component from this game state. More... | |
void | RemoveAllComponents () |
Removes all components from the game state. More... | |
void | RemoveAllComponents (Type type) |
Removes all components of the specified type from the game state. More... | |
void | RemoveAllComponents (Predicate< IGameComponent > predicate) |
Removes all components that match the supplied predicate function. More... | |
bool | HasComponent (IGameComponent component) |
Returns whether this game state contains the specified IGameComponent. More... | |
bool | HasComponent (Type type) |
Returns whether this game state contains a specific type of component. More... | |
bool | HasComponent (Func< IGameComponent, bool > func) |
Returns whether this game state contains a component that matches the supplied predicate. More... | |
IEnumerable< IGameComponent > | GetAllComponents () |
Returns a read-only collection of all components in this game state. More... | |
IGameComponent | GetComponent (Type type) |
Returns the specified component type if it exists in this game state. More... | |
IEnumerable< IGameComponent > | GetAllComponents (Type type) |
Returns all components of the specified type. More... | |
IGameComponent | GetComponent (Func< IGameComponent, bool > func) |
Returns the first component that matches the supplied predicate function. More... | |
IEnumerable< IGameComponent > | GetAllComponents (Func< IGameComponent, bool > func) |
Returns all components that matches the supplied predicate function. More... | |
Public Member Functions inherited from TriDevs.TriEngine.Interfaces.IDrawable | |
void | Draw () |
Draw the object to screen. More... | |
Public Member Functions inherited from TriDevs.TriEngine.Interfaces.IUpdatable | |
void | Update () |
Updates the object. More... | |
Properties | |
bool | Paused [get, set] |
Gets or sets a value indicating whether this game state is currently paused. More... | |
A game state that can be used with the game state manager. Represent a specific state of the game, like main menu and options screen.
IGameComponent TriDevs.TriEngine.StateManagement.IGameState.AddComponent | ( | IGameComponent | component | ) |
Adds a game component to this game state.
component | The component to add. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
IEnumerable<IGameComponent> TriDevs.TriEngine.StateManagement.IGameState.GetAllComponents | ( | ) |
Returns a read-only collection of all components in this game state.
Implemented in TriDevs.TriEngine.StateManagement.GameState.
IEnumerable<IGameComponent> TriDevs.TriEngine.StateManagement.IGameState.GetAllComponents | ( | Type | type | ) |
Returns all components of the specified type.
type | The type of game component requested. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
IEnumerable<IGameComponent> TriDevs.TriEngine.StateManagement.IGameState.GetAllComponents | ( | Func< IGameComponent, bool > | func | ) |
Returns all components that matches the supplied predicate function.
func | The predicate function. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
IGameComponent TriDevs.TriEngine.StateManagement.IGameState.GetComponent | ( | Type | type | ) |
Returns the specified component type if it exists in this game state.
type | The component type to get. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
IGameComponent TriDevs.TriEngine.StateManagement.IGameState.GetComponent | ( | Func< IGameComponent, bool > | func | ) |
Returns the first component that matches the supplied predicate function.
func | The predicate function. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
bool TriDevs.TriEngine.StateManagement.IGameState.HasComponent | ( | IGameComponent | component | ) |
Returns whether this game state contains the specified IGameComponent.
component | The component to check for. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
bool TriDevs.TriEngine.StateManagement.IGameState.HasComponent | ( | Type | type | ) |
Returns whether this game state contains a specific type of component.
type | The type to check for. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
bool TriDevs.TriEngine.StateManagement.IGameState.HasComponent | ( | Func< IGameComponent, bool > | func | ) |
Returns whether this game state contains a component that matches the supplied predicate.
func | Predicate function to use for search. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
void TriDevs.TriEngine.StateManagement.IGameState.Load | ( | ) |
Loads resources associated with this game component.
Implemented in TriDevs.TriEngine.StateManagement.GameState.
void TriDevs.TriEngine.StateManagement.IGameState.Pause | ( | ) |
Pauses the game state, preventing update calls from running.
Implemented in TriDevs.TriEngine.StateManagement.GameState.
void TriDevs.TriEngine.StateManagement.IGameState.RemoveAllComponents | ( | ) |
Removes all components from the game state.
Implemented in TriDevs.TriEngine.StateManagement.GameState.
void TriDevs.TriEngine.StateManagement.IGameState.RemoveAllComponents | ( | Type | type | ) |
Removes all components of the specified type from the game state.
type | The type of component to remove. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
void TriDevs.TriEngine.StateManagement.IGameState.RemoveAllComponents | ( | Predicate< IGameComponent > | predicate | ) |
Removes all components that match the supplied predicate function.
predicate | The predicate function. |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
void TriDevs.TriEngine.StateManagement.IGameState.RemoveComponent | ( | IGameComponent | component | ) |
Removes the specified component from this game state.
component |
Implemented in TriDevs.TriEngine.StateManagement.GameState.
void TriDevs.TriEngine.StateManagement.IGameState.Unload | ( | ) |
Unloads resources that were loaded in the Load method.
Implemented in TriDevs.TriEngine.StateManagement.GameState.
void TriDevs.TriEngine.StateManagement.IGameState.Unpause | ( | ) |
Unpauses the game state, enabling update calls again.
Implemented in TriDevs.TriEngine.StateManagement.GameState.
|
getset |
Gets or sets a value indicating whether this game state is currently paused.