com.jmex.game.state
Class BasicGameStateNode<G extends GameState>

java.lang.Object
  extended by com.jmex.game.state.GameState
      extended by com.jmex.game.state.GameStateNode<G>
          extended by com.jmex.game.state.BasicGameStateNode<G>

public class BasicGameStateNode<G extends GameState>
extends GameStateNode<G>

BasicGameStateNode this is identical to BasicGameState except it allows you to add additional GameStates as children beneath it.

Author:
Matthew D. Hicks

Field Summary
protected  Node rootNode
          The root of this GameStates scenegraph.
 
Fields inherited from class com.jmex.game.state.GameStateNode
children
 
Fields inherited from class com.jmex.game.state.GameState
active, name, parent
 
Constructor Summary
BasicGameStateNode(java.lang.String name)
          Creates a new BasicGameStateNode with a given name.
 
Method Summary
 void cleanup()
          Empty.
 Node getRootNode()
           
 void render(float tpf)
          Draws the rootNode.
 void update(float tpf)
          Updates the rootNode.
 
Methods inherited from class com.jmex.game.state.GameStateNode
activateAllChildren, activateChildNamed, attachChild, deactivateAllChildren, deactivateChildNamed, detachAllChildren, detachChild, detachChild, detachChild, getChild, getChild, getChildren, getQuantity, hasChild
 
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
 

Field Detail

rootNode

protected Node rootNode
The root of this GameStates scenegraph.

Constructor Detail

BasicGameStateNode

public BasicGameStateNode(java.lang.String name)
Creates a new BasicGameStateNode with a given name.

Parameters:
name - The name of this GameState.
Method Detail

update

public void update(float tpf)
Updates the rootNode.

Overrides:
update in class GameStateNode<G extends GameState>
Parameters:
tpf - The elapsed time since last frame.
See Also:
GameState.update(float)

render

public void render(float tpf)
Draws the rootNode.

Overrides:
render in class GameStateNode<G extends GameState>
Parameters:
tpf - The elapsed time since last frame.
See Also:
GameState.render(float)

cleanup

public void cleanup()
Empty.

Overrides:
cleanup in class GameStateNode<G extends GameState>
See Also:
GameState.cleanup()

getRootNode

public Node getRootNode()