org.deken.game.movement
Interface KeyMovement

All Superinterfaces:
InputListener, Movement, Updateable
All Known Implementing Classes:
FourKeyMovement, FourKeyToTile4Movement, TwoKeyMovement

public interface KeyMovement
extends Movement, InputListener

Title: KeyMovement

Description: This interface is for movements that need to be based on key inputs.

Copyright: Copyright (c) 2006

Version:
1.0
Author:
Gary Deken

Method Summary
 KeyDirectionAction[] getKeyDirectionActions()
          This methods returns the list of KeyDirectionActions for this KeyMovement.
 void setKeyDirectionAction(int index, int keyID, float direction)
          This method sets a KeyDirectionAction to the KeyMovement.
 void setSpeed(double speed)
          Sets the speed
 
Methods inherited from interface org.deken.game.movement.Movement
collideHorizontal, collideLayer, collideVertical, copy, getDirection, getGameVector, getXUpdate, getYUpdate, update
 
Methods inherited from interface org.deken.game.Updateable
getName
 
Methods inherited from interface org.deken.game.input.InputListener
addInputAction, getInputActionIds, notifyListener
 

Method Detail

getKeyDirectionActions

KeyDirectionAction[] getKeyDirectionActions()
This methods returns the list of KeyDirectionActions for this KeyMovement.

Returns:
KeyDirectionAction[]

setSpeed

void setSpeed(double speed)
Sets the speed

Parameters:
speed -

setKeyDirectionAction

void setKeyDirectionAction(int index,
                           int keyID,
                           float direction)
This method sets a KeyDirectionAction to the KeyMovement.

Parameters:
index -
keyID -
direction -