|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.movement.TimeMovement
public class TimeMovement
Title: TimeMovement
Description: This class allows for setting a Gamepiece's movements based on a sequence of time.
Copyright: Copyright (c) 2006
Constructor Summary | |
---|---|
TimeMovement()
TimeMovement |
Method Summary | |
---|---|
void |
addInputAction(InputAction inputAction,
int action)
Since this class has no InputActions, this method does nothing. |
void |
addTimeMovementAction(TimeMovementAction timeMovementAction)
This adds a TimeMovementAction to this TimeMovement, and increases the fullTime of the sequence. |
void |
collideHorizontal()
Adjust the horizontal (x axis) movement to a collision. |
void |
collideLayer()
Adjust the layer (z axis) movement to a collision. |
void |
collideVertical()
Adjust the vertical (y axis) movement to a collision. |
TimeMovement |
copy(Actor actor)
Copies this movement |
float |
getDirection()
This returns the direction of the movement. |
GameVector |
getGameVector()
This returns the current GameVector, based on the time. |
InputAction[] |
getInputActions()
This method returns null, since there are no InputAction associated with this. |
java.lang.String |
getName()
|
double |
getXUpdate()
This returns the amount of X movement for a given update. |
double |
getYUpdate()
This returns the amount of Y movement for a given update. |
boolean |
isRepeats()
This returns true if this TimeMovement is set to repeat when it completes the sequence. |
void |
setName(java.lang.String name)
|
void |
setRepeats(boolean repeats)
This flag is used to set whether this time sequence should repeat when it completes. |
void |
setRunning(boolean running)
|
void |
update(long elapseTime)
This updates the GameVector to the next movement in the sequence, updating the amount to be moved as well. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeMovement()
Method Detail |
---|
public void addInputAction(InputAction inputAction, int action)
inputAction
- InputActionaction
- intpublic void addTimeMovementAction(TimeMovementAction timeMovementAction)
timeMovementAction
- timeMovementActionpublic void collideHorizontal()
collideHorizontal
in interface Movement
public void collideVertical()
collideVertical
in interface Movement
public void collideLayer()
collideLayer
in interface Movement
public TimeMovement copy(Actor actor)
copy
in interface Movement
public float getDirection()
Movement
getDirection
in interface Movement
public GameVector getGameVector()
getGameVector
in interface Movement
public InputAction[] getInputActions()
public java.lang.String getName()
getName
in interface Updateable
public double getXUpdate()
Movement
getXUpdate
in interface Movement
public double getYUpdate()
Movement
getYUpdate
in interface Movement
public boolean isRepeats()
public void setName(java.lang.String name)
public void setRepeats(boolean repeats)
repeats
- booleanpublic void setRunning(boolean running)
public void update(long elapseTime)
update
in interface Movement
update
in interface Updateable
elapseTime
- long
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |