jme.controller
Class BasicController
java.lang.Object
jme.controller.AbstractGameController
jme.controller.BasicController
- All Implemented Interfaces:
- EntityController, KeyboardController, MouseController
- public class BasicController
- extends AbstractGameController
BasicController defines a very basic controller that
only purpose is to provide an exit method. By pressing the escape
key the use is able to exit the system. It also maintains the
Entity for rendering, that is, if the entity is a Camera, setting
the viewport.
- Author:
- Mark Powell
|
Method Summary |
protected boolean |
checkAdditionalKeys()
checkAdditionalKeys always returns true. |
void |
render()
render renders the entity the controller is controlling. |
boolean |
update(float frameRate)
update checks if the exit key has been pressed,
if not continues. |
| Methods inherited from class jme.controller.AbstractGameController |
getAbsoluteMousePositionX, getAbsoluteMousePositionY, getEntityPosition, getMouseDeltaX, getMouseDeltaY, getMousePositionX, getMousePositionY, getNumberOfButtons, isButtonDown, isKeyDown, next, pollKeyboard, pollMouse, setBuffered, setEntityPitch, setEntityPosition, setEntityRoll, setEntityYaw, setMousePosition |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
key
protected KeyBindingManager key
BasicController
public BasicController(Entity entity)
update
public boolean update(float frameRate)
update checks if the exit key has been pressed,
if not continues.
- Specified by:
update in class AbstractGameController
- Parameters:
frameRate - denotes the current speed of the rendering, to allow
for time based movements.
- Returns:
- true if exit has NOT been pressed, false otherwise.
render
public void render()
render renders the entity the controller is controlling.
- Specified by:
render in interface EntityController- Specified by:
render in class AbstractGameController
- See Also:
EntityController.render()
checkAdditionalKeys
protected boolean checkAdditionalKeys()
checkAdditionalKeys always returns true.
- Returns:
- true