Interface GameComponent

  • Method Summary

    Modifier and Type
    Method
    Description
    When saving a game, each GameComponent should return a Command that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null
    void
    setup(boolean gameStarting)
    Notify the GameComponent that a game has started/ended
  • Method Details

    • setup

      void setup(boolean gameStarting)
      Notify the GameComponent that a game has started/ended
      Parameters:
      gameStarting - if true, a game is starting. If false, then a game is ending
    • getRestoreCommand

      Command getRestoreCommand()
      When saving a game, each GameComponent should return a Command that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null