jmetest.game.state
Class IngameState

java.lang.Object
  extended bycom.jme.app.StandardGameState
      extended byjmetest.game.state.IngameState
All Implemented Interfaces:
GameState

public class IngameState
extends StandardGameState

Author:
Per Thulin

Field Summary
 
Fields inherited from class com.jme.app.StandardGameState
cam, input, stateNode
 
Constructor Summary
IngameState()
           
 
Method Summary
protected  void initInput()
          Gets called from super constructor.
 void switchTo()
          Gets called every time the game state manager switches to this game state.
 void update(float tpf)
          Gets called every frame.
 
Methods inherited from class com.jme.app.StandardGameState
cleanup, getCamera, getStateNode, render, setCamera
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IngameState

public IngameState()
Method Detail

switchTo

public void switchTo()
Gets called every time the game state manager switches to this game state. Sets the window title.

Specified by:
switchTo in interface GameState
Overrides:
switchTo in class StandardGameState
See Also:
GameState.switchTo()

initInput

protected void initInput()
Gets called from super constructor. Sets up the input handler that let us walk around using the w,s,a,d keys and mouse.

Specified by:
initInput in class StandardGameState

update

public void update(float tpf)
Gets called every frame. Updates input and checks if user has pressed the exit key. If the user has, we go back to main menu.

Specified by:
update in interface GameState
Overrides:
update in class StandardGameState
Parameters:
tpf - The time since last frame.