|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgameaction.AbstractGameAction
gameaction.Walk
public class Walk
A game action that represents walking to a new point in the game location
Constructor Summary | |
---|---|
Walk(AbstractCharacterSprite c,
int goToX,
int goToY)
Creates a new walking event with the specified coordinates that provide the target location of the walking event |
|
Walk(AbstractCharacterSprite c,
Path path)
Creates a new walking event with the specified coordinates that provide the target location of the walking event |
Method Summary | |
---|---|
double |
getTargetX()
Returns the x-coordinate of the walking target position |
double |
getTargetY()
Returns the y-coordinate of the walking target position |
boolean |
hasArrivedAtTarget()
Returns whether the character has arrived at its designated target location. |
void |
update(long elapsedTime)
Updates the game action |
Methods inherited from class gameaction.AbstractGameAction |
---|
getCharacter, isSecondMethodCall |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Walk(AbstractCharacterSprite c, int goToX, int goToY)
c
- the character that walksgoToX
- target x-coordinate for the walking eventgoToY
- target y-coordinate for the walking eventpublic Walk(AbstractCharacterSprite c, Path path)
c
- the character that walkspath
- path to walk for the characterMethod Detail |
---|
public double getTargetX()
public double getTargetY()
public boolean hasArrivedAtTarget()
public void update(long elapsedTime)
AbstractGameAction
update
in class AbstractGameAction
elapsedTime
- time between two frames
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |