Class ToggleModule

java.lang.Object
com.codingame.gameengine.module.toggle.ToggleModule
All Implemented Interfaces:
Module

public class ToggleModule extends Object implements Module
Author:
Jean Porée This module allows you to display or hide elements of the GraphicEntityModule using the viewer's options menu.
  • Method Details

    • onGameInit

      public void onGameInit()
      Specified by:
      onGameInit in interface Module
    • onAfterGameTurn

      public void onAfterGameTurn()
      Specified by:
      onAfterGameTurn in interface Module
    • onAfterOnEnd

      public void onAfterOnEnd()
      Specified by:
      onAfterOnEnd in interface Module
    • displayOnToggleState

      public void displayOnToggleState(Entity<?> entity, String toggle, boolean state)
      Will display the entity only when the toggle state matches the state you set
      Parameters:
      entity - which will be displayed
      toggle - the name of the toggle you want to use
      state - the state of the toggle where the entity will be displayed at