Interface iZodiacState

All Known Implementing Classes:
clockState, combatState, loadandsaveState, manufacturingState, movementState, remoteState, renderState

public interface iZodiacState
Applied to all the states to encourage consistency. Implementations should:
  • Accept a unique String ID in the constructor
  • Have no side effects on construction
  • have limited side effects on initialise() so that it isn't dependent on other states
Author:
Kevin Moore <dev@kevin.moore.name>
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    gameEvent​(gameEvent event)
    Respond to gameEvents broadcast on the eventbus.
    default void
    Output a detailed report to LOGGER.trace appropriate to this state - typically of the contents of the entity repository.
    default void
    trace​(com.simsilica.es.EntityId primary)
    Provide a detailed report to LOGGER.trace on the specific entity.
    default void
    Respond to windowEvents broadcast on this eventbus.
  • Method Details

    • trace

      default void trace()
      Output a detailed report to LOGGER.trace appropriate to this state - typically of the contents of the entity repository.
    • trace

      default void trace(com.simsilica.es.EntityId primary)
      Provide a detailed report to LOGGER.trace on the specific entity.
      Parameters:
      primary -
    • gameEvent

      default void gameEvent(gameEvent event)
      Respond to gameEvents broadcast on the eventbus.

      Since the bus is async the code will run on a different thread from the main application. best to make the event handling short and sharp!

      Parameters:
      event -
    • windowEvent

      default void windowEvent(windowEvent event)
      Respond to windowEvents broadcast on this eventbus.
      Parameters:
      event -