|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rico.adventure.actions.AbstractAction
de.rico.adventure.actions.custom.Walk
public class Walk
A game action that represents walking to a new point in the game location applying path finding
| Constructor Summary | |
|---|---|
Walk(AbstractCharacter c,
float x,
float z,
float speed)
Creates a new walking action with the specified (x,z)-coordinates as the target position. |
|
Walk(AbstractCharacter c,
float x,
float z,
float speed,
java.lang.String animName)
Creates a new walking action with the specified (x,z)-coordinates as the target position. |
|
Walk(AbstractCharacter c,
Path path,
float speed)
Creates a new walking action with the specified path that provides the waypoints to the target location. |
|
Walk(AbstractCharacter c,
Path path,
float speed,
java.lang.String animName)
Creates a new walking action with the specified path that provides the waypoints to the target location. |
|
| Method Summary | |
|---|---|
void |
draw(javax.media.opengl.GL gl)
This method renders the game action, if needed. |
void |
finishUp()
Implementations of this method hold code that needs to be called before the game action can be removed from the queue (prematurely) without causing side effects. |
float |
getTargetX()
Returns the x-coordinate of the walking target position |
float |
getTargetZ()
Returns the z-coordinate of the walking target position |
boolean |
hasArrivedAtTarget()
Returns whether the character has arrived at its designated target location. |
void |
update(long elapsedTime)
This method updates the game action |
| Methods inherited from class de.rico.adventure.actions.AbstractAction |
|---|
getEntity |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Walk(AbstractCharacter c,
float x,
float z,
float speed)
c - character that ought to be walkingx - x-coordinate of the target positionz - z-coordinate of the target positionspeed - speed factor to use for walking
public Walk(AbstractCharacter c,
float x,
float z,
float speed,
java.lang.String animName)
c - character that ought to be walkingx - x-coordinate of the target positionz - z-coordinate of the target positionspeed - speed factor to use for walkinganimName - name of the animation to play while the
action is active
public Walk(AbstractCharacter c,
Path path,
float speed)
c - the character that walkspath - path to walk for the characterspeed - speed factor to use for walking
public Walk(AbstractCharacter c,
Path path,
float speed,
java.lang.String animName)
c - the character that walkspath - path to walk for the characterspeed - speed factor to use for walkinganimName - name of the animation to play while the
action is active| Method Detail |
|---|
public float getTargetX()
public float getTargetZ()
public boolean hasArrivedAtTarget()
public void update(long elapsedTime)
AbstractAction
update in class AbstractActionelapsedTime - time between two framespublic void draw(javax.media.opengl.GL gl)
AbstractAction
draw in class AbstractActionpublic void finishUp()
AbstractAction
finishUp in class AbstractAction
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||