Class ToggleModule
java.lang.Object
com.codingame.gameengine.module.toggle.ToggleModule
- All Implemented Interfaces:
Module
- Author:
- Jean Porée This module allows you to display or hide elements of the GraphicEntityModule using the viewer's options menu.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayOnToggleState(Entity<?> entity, String toggle, boolean state) Will display the entity only when the toggle state matches the state you setvoidCalled by the game manager after calling theReferee's gameTurn method.voidCalled by the game manager after calling theReferee's onEnd method.voidCalled by the game manager after calling theReferee's init method.
-
Method Details
-
onGameInit
public void onGameInit()Description copied from interface:ModuleCalled by the game manager after calling theReferee's init method. The module must be registered to the game manager.- Specified by:
onGameInitin interfaceModule
-
onAfterGameTurn
public void onAfterGameTurn()Description copied from interface:ModuleCalled by the game manager after calling theReferee's gameTurn method. The module must be registered to the game manager.- Specified by:
onAfterGameTurnin interfaceModule
-
onAfterOnEnd
public void onAfterOnEnd()Description copied from interface:ModuleCalled by the game manager after calling theReferee's onEnd method. The module must be registered to the game manager.- Specified by:
onAfterOnEndin interfaceModule
-
displayOnToggleState
Will display the entity only when the toggle state matches the state you set- Parameters:
entity- which will be displayedtoggle- the name of the toggle you want to usestate- the state of the toggle where the entity will be displayed at
-