TriEngine  v0.0.16
General-purpose engine in C#/OpenGL
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
TriDevs.TriEngine.StateManagement.IGameStateManager Interface Reference

Game state manager that keeps track of the active game states and provides methods to control the states. More...

Inheritance diagram for TriDevs.TriEngine.StateManagement.IGameStateManager:
[legend]
Collaboration diagram for TriDevs.TriEngine.StateManagement.IGameStateManager:
[legend]

Public Member Functions

IGameState Push (IGameState state)
 Pushes a new game state onto the stack, pausing the current one. More...
 
IGameState Pop ()
 Pops the currently active state from the stack, unpausing the previous one. More...
 
IGameState Peek ()
 Returns the game state at the top of the stack, without popping it. More...
 
IGameState Switch (IGameState state)
 Switches to a new game state, discarding all previous ones in the stack. More...
 
- Public Member Functions inherited from TriDevs.TriEngine.Interfaces.IUpdatable
void Update ()
 Updates the object. More...
 
- Public Member Functions inherited from TriDevs.TriEngine.Interfaces.IDrawable
void Draw ()
 Draw the object to screen. More...
 

Properties

int StateCount [get]
 Gets the number of game states currently in the stack. More...
 
IGameState ActiveState [get]
 Gets the currently active game state. More...
 

Detailed Description

Game state manager that keeps track of the active game states and provides methods to control the states.

Member Function Documentation

IGameState TriDevs.TriEngine.StateManagement.IGameStateManager.Peek ( )

Returns the game state at the top of the stack, without popping it.

Returns
The state at the top of the stack.

Implemented in TriDevs.TriEngine.StateManagement.GameStateManager.

IGameState TriDevs.TriEngine.StateManagement.IGameStateManager.Pop ( )

Pops the currently active state from the stack, unpausing the previous one.

Returns
The state that was popped.

Implemented in TriDevs.TriEngine.StateManagement.GameStateManager.

IGameState TriDevs.TriEngine.StateManagement.IGameStateManager.Push ( IGameState  state)

Pushes a new game state onto the stack, pausing the current one.

Parameters
stateThe new game state to push onto the stack.
Returns
The game state that was pushed.

Implemented in TriDevs.TriEngine.StateManagement.GameStateManager.

IGameState TriDevs.TriEngine.StateManagement.IGameStateManager.Switch ( IGameState  state)

Switches to a new game state, discarding all previous ones in the stack.

Parameters
stateThe new state to switch to.
Returns
The state that was switched to.

Implemented in TriDevs.TriEngine.StateManagement.GameStateManager.

Property Documentation

IGameState TriDevs.TriEngine.StateManagement.IGameStateManager.ActiveState
get

Gets the currently active game state.

int TriDevs.TriEngine.StateManagement.IGameStateManager.StateCount
get

Gets the number of game states currently in the stack.


The documentation for this interface was generated from the following file: