net.cscott.sdr.anim
Class SdrFirstPersonHandler
java.lang.Object
com.jme.input.InputHandler
net.cscott.sdr.anim.SdrFirstPersonHandler
public abstract class SdrFirstPersonHandler
- extends InputHandler
FirsPersonController
defines an InputHandler that sets
input to be controlled similar to First Person Shooting games. By default the
commands are, WSAD moves the camera forward, backward and strafes. The
arrow keys rotate and tilt the camera and the mouse also rotates and tilts
the camera.
This is a handler that is composed from KeyboardLookHandler
and MouseLookHandler
.
- Version:
- $Id: SdrFirstPersonHandler.java,v 1.2 2007-03-07 19:17:20 cananian Exp $
- Author:
- Mark Powell
Method Summary |
abstract void |
onAction()
This method is called whenever an appropriate keyboard or mouse action
is performed (that is, whenever this handler changes the camera
position or angle. |
Methods inherited from class com.jme.input.InputHandler |
addAction, addAction, addAction, addAction, addAction, addAction, addDevice, addToAttachedHandlers, clearActions, getBooleanProp, getDevices, getFloatProp, getFromAttachedHandlers, getIntProp, getObjectProp, getParent, isEnabled, processTriggers, removeAction, removeAction, removeAllActions, removeAllFromAttachedHandlers, removeFromAttachedHandlers, setActionSpeed, setActionSpeed, setEnabled, setEnabledOfAttachedHandlers, setParent, sizeOfAttachedHandlers, update, updateAttachedHandlers |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SdrFirstPersonHandler
public SdrFirstPersonHandler(Camera cam,
float moveSpeed,
float turnSpeed)
- Creates a first person handler.
- Parameters:
cam
- The camera to move by this handler.moveSpeed
- action speed for move actionsturnSpeed
- action speed for rotating actions
onAction
public abstract void onAction()
- This method is called whenever an appropriate keyboard or mouse action
is performed (that is, whenever this handler changes the camera
position or angle. Override in a subclass in order to register/react
to this event.
Copyright (c) 2006 C. Scott Ananian