Class clockState

java.lang.Object
com.jme3.app.state.BaseAppState
name.moore.kevin.ze.game.states.clockState
All Implemented Interfaces:
com.jme3.app.state.AppState, iZodiacState

public class clockState extends com.jme3.app.state.BaseAppState implements iZodiacState
Regulates the progress of the game via the stardate. Tick tock.
Author:
Kevin Moore <dev@kevin.moore.name>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private com.jme3.asset.AssetManager
     
    private float
     
    private starDate
    Global - the date of the current game 'day'.
    private short
    Game speed.
    private com.jme3.input.InputManager
     
    private static org.slf4j.Logger
     
    private int
     
    private com.jme3.scene.Node
     
    private com.jme3.app.state.AppStateManager
     
    private com.jme3.renderer.ViewPort
     
    private iZodiacApp
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    cleanup​(com.jme3.app.Application app)
    protected void
    initialize​(com.jme3.app.Application a)
    protected void
     
    protected void
     
    private void
     
    void
    update​(float tpf)
    Called automatically and repeatedly while the state is enabled and attached.
    void
    Respond to windowEvents broadcast on this eventbus.

    Methods inherited from class com.jme3.app.state.BaseAppState

    cleanup, getApplication, getId, getState, getState, getState, getState, getStateManager, initialize, isEnabled, isInitialized, postRender, render, setEnabled, setId, stateAttached, stateDetached

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface name.moore.kevin.ze.game.states.iZodiacState

    gameEvent, trace, trace
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • zapp

      private iZodiacApp zapp
    • rootNode

      private com.jme3.scene.Node rootNode
    • assetManager

      private com.jme3.asset.AssetManager assetManager
    • stateManager

      private com.jme3.app.state.AppStateManager stateManager
    • inputManager

      private com.jme3.input.InputManager inputManager
    • viewPort

      private com.jme3.renderer.ViewPort viewPort
    • renderingCounter

      private int renderingCounter
    • gameCurrentDate

      private starDate gameCurrentDate
      Global - the date of the current game 'day'.
    • gameSpeed

      private short gameSpeed
      Game speed. 0 = paused or stopped. 1 = normal play 2 = fast-forward 3 = step to next event
    • counttpf

      private float counttpf
  • Constructor Details

    • clockState

      public clockState(String id)
      Parameters:
      id -
  • Method Details

    • initialize

      protected void initialize(com.jme3.app.Application a)
      Specified by:
      initialize in class com.jme3.app.state.BaseAppState
    • cleanup

      protected void cleanup(com.jme3.app.Application app)
      Specified by:
      cleanup in class com.jme3.app.state.BaseAppState
    • onEnable

      protected void onEnable()
      Specified by:
      onEnable in class com.jme3.app.state.BaseAppState
    • onDisable

      protected void onDisable()
      Specified by:
      onDisable in class com.jme3.app.state.BaseAppState
    • update

      public void update(float tpf)
      Called automatically and repeatedly while the state is enabled and attached. constantvelocity*tpf = distance to move.
      Specified by:
      update in interface com.jme3.app.state.AppState
      Overrides:
      update in class com.jme3.app.state.BaseAppState
      Parameters:
      tpf - - current system provided time per frame eg 0.016717996
    • windowEvent

      public void windowEvent(windowEvent event)
      Description copied from interface: iZodiacState
      Respond to windowEvents broadcast on this eventbus.
      Specified by:
      windowEvent in interface iZodiacState
    • resetStarDate

      private void resetStarDate()