Package VASSAL.build.module
Interface GameComponent
- All Known Implementing Classes:
BasicLogger,Board.Cleanup,BoardPicker,DrawPile,EventLog,GameRefresher,GlobalMap,GlobalProperty,HidePiecesButton,HighlightLastMoved,InternetDiceButton,Inventory,Map,MapShader,ModuleExtension,ModulePlugin,MultiActionButton,NewGameIndicator,NotesWindow,ObscurableOptions,PieceMover,PlayerHand,PlayerRoster,PredefinedSetup,PrivateMap,PrivateNotesController,SecretNotesController,SetupStack,StartupGlobalKeyCommand,ToolbarMenu,TurnTracker,WidgetMap,Zone,ZoneProperty,Zoomer
public interface GameComponent
A GameComponent is any object which reacts to the start/end of a
game, or whose state can be saved as part of a game.
-
Method Summary
Modifier and Type Method Description CommandgetRestoreCommand()When saving a game, each GameComponent should return aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return nullvoidsetup(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 aCommandthat, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null
-