com.jmex.game.state
Class FPSGameState

java.lang.Object
  extended by com.jmex.game.state.GameState
      extended by com.jmex.game.state.BasicGameState
          extended by com.jmex.game.state.TextGameState
              extended by com.jmex.game.state.FPSGameState

public class FPSGameState
extends TextGameState

FPSGameState is a simple extension of TextGameState to display the frames per second. This provides a convenient mechanism to display or disable the frames per second in a game.

Author:
Matthew D. Hicks

Field Summary
 
Fields inherited from class com.jmex.game.state.TextGameState
textNode, textObject
 
Fields inherited from class com.jmex.game.state.BasicGameState
rootNode
 
Fields inherited from class com.jmex.game.state.GameState
active, name, parent
 
Constructor Summary
FPSGameState()
           
 
Method Summary
 void update(float tpf)
          Updates the rootNode.
 
Methods inherited from class com.jmex.game.state.TextGameState
cleanup, getText, render, setText
 
Methods inherited from class com.jmex.game.state.BasicGameState
getRootNode
 
Methods inherited from class com.jmex.game.state.GameState
getName, getParent, isActive, setActive, setName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FPSGameState

public FPSGameState()
Method Detail

update

public void update(float tpf)
Description copied from class: BasicGameState
Updates the rootNode.

Overrides:
update in class TextGameState
Parameters:
tpf - The elapsed time since last frame.
See Also:
GameState.update(float)