jmetest.TutorialGuide
Class HelloSimpleGame

java.lang.Object
  extended bycom.jme.app.AbstractGame
      extended bycom.jme.app.BaseGame
          extended byjmetest.TutorialGuide.HelloSimpleGame

public class HelloSimpleGame
extends BaseGame

Started Date: Jul 29, 2004

Is used to demonstrate the inner workings of SimpleGame.

Author:
Jack Lindamood

Field Summary
protected  Camera cam
          The camera that we see through.
static java.lang.String fontLocation
          Location of the font for jME's text at the bottom
protected  Text fps
          Displays all the lovely information at the bottom.
protected  Node fpsNode
          The root node of our text.
protected  InputHandler input
          Handles our mouse/keyboard input.
protected  LightState lightState
          A lightstate to turn on and off for the rootNode
protected  Node rootNode
          The root of our normal scene graph.
protected  boolean showBounds
          True if the renderer should display bounds.
protected  Timer timer
          High resolution timer for jME.
protected  float tpf
          Simply an easy way to get at timer.getTimePerFrame().
protected  WireframeState wireState
          A wirestate to turn on and off for the rootNode
 
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
HelloSimpleGame()
           
 
Method Summary
protected  void cleanup()
          Cleans up the keyboard.
protected  void initGame()
          Creates rootNode, lighting, statistic text, and other basic render states.
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 simpleInitGame()
           
protected  void simpleRender()
          Can be defined in derived classes for custom rendering.
protected  void simpleUpdate()
          Can be defined in derived classes for custom updating.
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

cam

protected Camera cam
The camera that we see through.


rootNode

protected Node rootNode
The root of our normal scene graph.


input

protected InputHandler input
Handles our mouse/keyboard input.


timer

protected Timer timer
High resolution timer for jME.


fpsNode

protected Node fpsNode
The root node of our text.


fps

protected Text fps
Displays all the lovely information at the bottom.


tpf

protected float tpf
Simply an easy way to get at timer.getTimePerFrame().


showBounds

protected boolean showBounds
True if the renderer should display bounds.


wireState

protected WireframeState wireState
A wirestate to turn on and off for the rootNode


lightState

protected LightState lightState
A lightstate to turn on and off for the rootNode


fontLocation

public static java.lang.String fontLocation
Location of the font for jME's text at the bottom

Constructor Detail

HelloSimpleGame

public HelloSimpleGame()
Method Detail

main

public static void main(java.lang.String[] args)

update

protected final void update(float interpolation)
This is called every frame in BaseGame.start()

Specified by:
update in class BaseGame
Parameters:
interpolation - unused in this implementation
See Also:
AbstractGame.update(float interpolation)

render

protected final void render(float interpolation)
This is called every frame in BaseGame.start(), after update()

Specified by:
render in class BaseGame
Parameters:
interpolation - unused in this implementation
See Also:
AbstractGame.render(float interpolation)

initSystem

protected final void initSystem()
Creates display, sets up camera, and binds keys. Called in BaseGame.start() directly after the dialog box.

Specified by:
initSystem in class BaseGame
See Also:
AbstractGame.initSystem()

initGame

protected final void initGame()
Creates rootNode, lighting, statistic text, and other basic render states. Called in BaseGame.start() after initSystem().

Specified by:
initGame in class BaseGame
See Also:
AbstractGame.initGame()

simpleInitGame

protected void simpleInitGame()

simpleUpdate

protected void simpleUpdate()
Can be defined in derived classes for custom updating. Called every frame in update.


simpleRender

protected void simpleRender()
Can be defined in derived classes for custom rendering. Called every frame in render.


reinit

protected void reinit()
unused

Specified by:
reinit in class BaseGame
See Also:
AbstractGame.reinit()

cleanup

protected void cleanup()
Cleans up the keyboard.

Specified by:
cleanup in class BaseGame
See Also:
AbstractGame.cleanup()