- java.lang.Object
-
- ilusr.gamestatemanager.GameStateManager
-
- ilusr.gamestatemanager.BufferedGameStateManager
-
- All Implemented Interfaces:
IFinishListener
,IGameStateListener
,IGameStateManager
public class BufferedGameStateManager extends GameStateManager
- Author:
- Jeff Riggle
-
-
Constructor Summary
Constructors Constructor Description BufferedGameStateManager(int bufferSize, IDataSource source, T id, IGameState currentGameState, D runtimeData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
addGameState(IGameState gameState, T identifier)
<T> void
completed(T completionData)
-
Methods inherited from class ilusr.gamestatemanager.GameStateManager
addFinishListener, addGameState, clearGameStates, currentGameState, currentGameState, finish, gameStateMap, onFinished, removeFinishListener, removeGameState, runtimeData, runtimeData, start
-
-
-
-
Constructor Detail
-
BufferedGameStateManager
public BufferedGameStateManager(int bufferSize, IDataSource source, T id, IGameState currentGameState, D runtimeData)
-
-
Method Detail
-
addGameState
public <T> void addGameState(IGameState gameState, T identifier) throws BufferOverflowException
- Parameters:
gameState
- The game state to addidentifier
- The id of the game state.- Throws:
BufferOverflowException
-
completed
public <T> void completed(T completionData)
- Specified by:
completed
in interfaceIGameStateListener
- Overrides:
completed
in classGameStateManager
- Parameters:
completionData
- The data ran at completion.
-
-