Class GameState

  • All Implemented Interfaces:
    ilusr.core.interfaces.IDispose, IGameState

    public class GameState
    extends Object
    implements IGameState
    Author:
    Jeff Riggle
    • Constructor Detail

      • GameState

        public GameState​(T content)
        Parameters:
        content - The initial content for the game state.
    • Method Detail

      • stateCompleted

        public <T> void stateCompleted​(T data)
        Description copied from interface: IGameState
        Fire the game state completed event.
        Specified by:
        stateCompleted in interface IGameState
      • stateContent

        public <T> T stateContent()
        Specified by:
        stateContent in interface IGameState
        Returns:
        The content for the game state.
      • stateContent

        public <T> void stateContent​(T value)
        Specified by:
        stateContent in interface IGameState
        Parameters:
        value - The new content for the game state.
      • run

        public <T> void run​(T data)
        Description copied from interface: IGameState
        Runs the game state with some data.
        Specified by:
        run in interface IGameState
      • dispose

        public void dispose()
        Specified by:
        dispose in interface ilusr.core.interfaces.IDispose
      • addFinishEventListener

        public void addFinishEventListener​(IFinishListener listener)
        Specified by:
        addFinishEventListener in interface IGameState
        Parameters:
        listener - A @see IFinishListener to run if this game state finishes the game.
      • finish

        public void finish()
        Description copied from interface: IGameState
        Finishes the game only signal this if you want to end the game completely.
        Specified by:
        finish in interface IGameState