|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.app.AbstractGame
com.jme.app.BaseGame
jmetest.game.state.TestGameStateSystem
This test shows how to use the game state system. It can not extend SimpleGame because a lot of SimpleGames functions (e.g. camera and input) has been delegated down to the individual game states. So this class is basically a stripped down version of SimpleGame which inits the GameStateManager.
| Field Summary | |
protected Node |
rootNode
|
protected Timer |
timer
|
protected float |
tpf
|
| Fields inherited from class com.jme.app.AbstractGame |
ALWAYS_SHOW_PROPS_DIALOG, display, finished, FIRSTRUN_OR_NOCONFIGFILE_SHOW_PROPS_DIALOG, NEVER_SHOW_PROPS_DIALOG, properties |
| Constructor Summary | |
TestGameStateSystem()
|
|
| Method Summary | |
protected void |
cleanup()
Cleans up the keyboard. |
protected void |
initGame()
Called in BaseGame.start() after initSystem(). |
protected void |
initSystem()
Creates display, sets up camera, and binds keys. |
static void |
main(java.lang.String[] args)
|
protected void |
reinit()
unused |
protected void |
render(float interpolation)
This is called every frame in BaseGame.start(), after update() |
protected void |
update(float interpolation)
This is called every frame in BaseGame.start() |
| Methods inherited from class com.jme.app.BaseGame |
quit, start |
| Methods inherited from class com.jme.app.AbstractGame |
assertDisplayCreated, finish, getAttributes, getVersion, setDialogBehaviour, setDialogBehaviour, setDialogBehaviour |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Node rootNode
protected Timer timer
protected float tpf
| Constructor Detail |
public TestGameStateSystem()
| Method Detail |
protected final void update(float interpolation)
update in class BaseGameinterpolation - unused in this implementationAbstractGame#update(float interpolation)protected final void render(float interpolation)
render in class BaseGameinterpolation - unused in this implementationAbstractGame#render(float interpolation)protected final void initSystem()
initSystem in class BaseGameAbstractGame#initSystem()protected final void initGame()
initGame in class BaseGameAbstractGame#initGame()protected void reinit()
reinit in class BaseGameAbstractGame#reinit()protected void cleanup()
cleanup in class BaseGameAbstractGame#cleanup()public static void main(java.lang.String[] args)
args -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||