|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.movement.ScriptMovement
public class ScriptMovement
Title: ScriptMovement
Description: ScriptMovement is movement that is done based on
ScriptMovementActions. Each ScriptMovementAction is used to determine how the
parent
Constructor Summary | |
---|---|
ScriptMovement(Actor actor)
|
Method Summary | |
---|---|
void |
addAction(ScriptMovementAction scriptMovementAction)
Add another action 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. |
Movement |
copy(Actor actor)
Copies the movement. |
float |
getDirection()
This returns the direction of the movement. |
GameVector |
getGameVector()
This returns the current GameVector for this movement. |
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 |
isDone()
Returns if this script has completed all its steps. |
void |
reset()
Resets the script to start over. |
void |
setName(java.lang.String name)
|
void |
setRunning(boolean running)
|
void |
setSpeed(double speed)
|
void |
update(long elapseTime)
This method takes the elapse time, since the last update, and to determine the next movement to set to the GameVector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptMovement(Actor actor)
Method Detail |
---|
public void addAction(ScriptMovementAction scriptMovementAction)
scriptMovementAction
- public void collideHorizontal()
Movement
collideHorizontal
in interface Movement
public void collideVertical()
Movement
collideVertical
in interface Movement
public void collideLayer()
Movement
collideLayer
in interface Movement
public Movement copy(Actor actor)
Movement
copy
in interface Movement
public float getDirection()
Movement
getDirection
in interface Movement
public GameVector getGameVector()
Movement
getGameVector
in interface Movement
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 isDone()
public void reset()
public void setName(java.lang.String name)
public void setRunning(boolean running)
public void setSpeed(double speed)
public void update(long elapseTime)
Movement
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 |