-
- All Superinterfaces:
IFinishListener
,IGameStateListener
- All Known Implementing Classes:
BufferedGameStateManager
,GameStateManager
public interface IGameStateManager extends IGameStateListener, IFinishListener
- Author:
- Jeff Riggle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addFinishListener(IFinishListener listener)
<T> void
addGameState(T identifier, IGameState gameState)
void
clearGameStates()
Clears all game states but the current game state.IGameState
currentGameState()
void
currentGameState(IGameState gameState)
void
finish()
Finishes the game.void
removeFinishListener(IFinishListener listener)
<T> void
removeGameState(T identifier)
<D> D
runtimeData()
<D> void
runtimeData(D data)
void
start()
Starts running the current game state.-
Methods inherited from interface ilusr.gamestatemanager.IFinishListener
onFinished
-
Methods inherited from interface ilusr.gamestatemanager.IGameStateListener
completed
-
-
-
-
Method Detail
-
currentGameState
IGameState currentGameState()
- Returns:
- The currently running game state.
-
currentGameState
void currentGameState(IGameState gameState)
- Parameters:
gameState
- The new game state (maybe this should be removed).
-
addGameState
<T> void addGameState(T identifier, IGameState gameState)
- Parameters:
identifier
- The unique id for this game state.gameState
- The actual game state.
-
removeGameState
<T> void removeGameState(T identifier)
- Parameters:
identifier
- The unique id for this game state.
-
clearGameStates
void clearGameStates()
Clears all game states but the current game state.
-
runtimeData
<D> void runtimeData(D data)
- Parameters:
data
- The new runtime data for this game state manager.
-
runtimeData
<D> D runtimeData()
- Returns:
- The runtime data associated with this game state manager.
-
start
void start()
Starts running the current game state.
-
finish
void finish()
Finishes the game.
-
addFinishListener
void addFinishListener(IFinishListener listener)
- Parameters:
listener
- A @see IFinishListener to be called when the game is finished.
-
removeFinishListener
void removeFinishListener(IFinishListener listener)
- Parameters:
listener
- A @see IFinishListener to be removed.
-
-