org.xith3d.utility.input
Class EightDirectionsMovement

java.lang.Object
  extended by org.xith3d.utility.input.EightDirectionsMovement
All Implemented Interfaces:
Updatable

public class EightDirectionsMovement
extends java.lang.Object
implements Updatable

Eight directions movement, controlled by the arrow keys, adjustable speed.


Constructor Summary
EightDirectionsMovement(org.jagatoo.input.devices.Keyboard keyboard, Placeable placeable, float speed, Updater updater)
          New EightDirectionsMovement
EightDirectionsMovement(Placeable placeable, float speed, Updater updater)
          New EightDirectionsMovement
 
Method Summary
 float getSpeed()
           
 void setSpeed(float speed)
           
 void update(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          Updates this Updatable object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EightDirectionsMovement

public EightDirectionsMovement(org.jagatoo.input.devices.Keyboard keyboard,
                               Placeable placeable,
                               float speed,
                               Updater updater)
New EightDirectionsMovement

Parameters:
keyboard -
placeable -
speed -
updater -

EightDirectionsMovement

public EightDirectionsMovement(Placeable placeable,
                               float speed,
                               Updater updater)
New EightDirectionsMovement

Parameters:
placeable -
speed -
updater -
Method Detail

setSpeed

public void setSpeed(float speed)
Parameters:
speed - the speed to set

getSpeed

public final float getSpeed()
Returns:
the speed

update

public void update(long gameTime,
                   long frameTime,
                   UpdatingThread.TimingMode timingMode)
Description copied from interface: Updatable
Updates this Updatable object.

Specified by:
update in interface Updatable
Parameters:
gameTime - the gameTime in Milliseconds
frameTime - the frameTime in Milliseconds (needed time for the last frame)
timingMode - the TimingMode to use for frameTime.