Interface IGameState

  • All Superinterfaces:
    ilusr.core.interfaces.IDispose
    All Known Implementing Classes:
    GameState

    public interface IGameState
    extends ilusr.core.interfaces.IDispose
    Author:
    Jeff Riggle
    • Method Detail

      • addCompletedEventListener

        void addCompletedEventListener​(IGameStateListener listener)
        Add a listener for the game state completed event.
      • removeCompletedEventListener

        void removeCompletedEventListener​(IGameStateListener listener)
        Remove a listener from the game state completed event.
      • addFinishEventListener

        void addFinishEventListener​(IFinishListener listener)
        Parameters:
        listener - A @see IFinishListener to run if this game state finishes the game.
      • removeFinishEventListener

        void removeFinishEventListener​(IFinishListener listener)
        Parameters:
        listener - A @see IFinishListener to remove.
      • stateCompleted

        <T> void stateCompleted​(T data)
        Fire the game state completed event.
      • stateContent

        <T> T stateContent()
        Returns:
        The content for the game state.
      • stateContent

        <T> void stateContent​(T value)
        Parameters:
        value - The new content for the game state.
      • run

        <T> void run​(T data)
        Runs the game state with some data.
      • finish

        void finish()
        Finishes the game only signal this if you want to end the game completely.