|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jmex.game.state.GameState
com.jmex.game.state.BasicGameState
public class BasicGameState
BasicGameState
should be a good foundation of any GameState really.
It implements all abstract methods of GameState
, and all that
sets it apart is that it creates a rootNode which it update and render.
Field Summary | |
---|---|
protected Node |
rootNode
The root of this GameStates scenegraph. |
Fields inherited from class com.jmex.game.state.GameState |
---|
active, name, parent |
Constructor Summary | |
---|---|
BasicGameState(java.lang.String name)
Creates a new BasicGameState 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.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 |
---|
protected Node rootNode
Constructor Detail |
---|
public BasicGameState(java.lang.String name)
name
- The name of this GameState.Method Detail |
---|
public void update(float tpf)
update
in class GameState
tpf
- The elapsed time since last frame.GameState.update(float)
public void render(float tpf)
render
in class GameState
tpf
- The elapsed time since last frame.GameState.render(float)
public void cleanup()
cleanup
in class GameState
GameState.cleanup()
public Node getRootNode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |