|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.movement.BaseMovement
org.deken.game.movement.SimpleMovement
public class SimpleMovement
Title: SimpleMovement
Description: This movement is for movements that are one directional. A simple movement with no intelligence.
Copyright: (c) 2010
Field Summary |
---|
Fields inherited from class org.deken.game.movement.BaseMovement |
---|
gameVector, name |
Constructor Summary | |
---|---|
protected |
SimpleMovement()
|
|
SimpleMovement(GameVector gameVector)
SimpleMovement Creates a SimpleMovement going in the direction of the GameVector. |
Method Summary | |
---|---|
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. |
SimpleMovement |
copy(Actor actor)
Copies this SimpleMovement. |
java.lang.String |
getName()
|
double |
getSpeed()
|
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. |
void |
setGameVector(GameVector gameVector)
|
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 org.deken.game.movement.BaseMovement |
---|
baseCopy, getDirection, getGameVector, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.deken.game.movement.Movement |
---|
getDirection, getGameVector |
Constructor Detail |
---|
public SimpleMovement(GameVector gameVector)
gameVector
- GameVectorprotected SimpleMovement()
Method Detail |
---|
public void collideHorizontal()
collideHorizontal
in interface Movement
public void collideVertical()
collideVertical
in interface Movement
public void collideLayer()
collideLayer
in interface Movement
public SimpleMovement copy(Actor actor)
copy
in interface Movement
public java.lang.String getName()
getName
in interface Updateable
getName
in class BaseMovement
public double getSpeed()
public double getXUpdate()
Movement
getXUpdate
in interface Movement
public double getYUpdate()
Movement
getYUpdate
in interface Movement
public void setGameVector(GameVector gameVector)
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 |