Interface IGameStateManager

    • 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.