Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.rico.adventure.actions.custom.concurrent
Class ConcurrentWalk

    java.lang.Object
      de.rico.adventure.actions.custom.concurrent.AbstractConcurrentAction
          de.rico.adventure.actions.custom.concurrent.ConcurrentWalk

    public class ConcurrentWalk

extends AbstractConcurrentAction

A game action that represents walking to a new point in the game location applying path finding

Author:
  Frank Bruns

Constructor Summary
`ConcurrentWalk(AbstractCharacter c, float x, float z, float speed)` Creates a new walking action with the specified (x,z)-coordinates as the target position.
`ConcurrentWalk(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.
`ConcurrentWalk(AbstractCharacter c, Path path, float speed)` Creates a new walking action with the specified path that provides the waypoints to the target location.
`ConcurrentWalk(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 concurrent 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 concurrent 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 concurrent game action

Methods inherited from class de.rico.adventure.actions.custom.concurrent.AbstractConcurrentAction
`getEntity`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConcurrentWalk

    public ConcurrentWalk(AbstractCharacter c,
                          float x,
                          float z,
                          float speed)

  Creates a new walking action with the specified (x,z)-coordinates as the target position.

  Parameters:
    `c` - character that ought to be walking
    `x` - x-coordinate of the target position
    `z` - z-coordinate of the target position
    `speed` - speed factor to use for walking

### ConcurrentWalk

    public ConcurrentWalk(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.

  Parameters:
    `c` - character that ought to be walking
    `x` - x-coordinate of the target position
    `z` - z-coordinate of the target position
    `speed` - speed factor to use for walking
    `animName` - name of the animation to play while the action is active

### ConcurrentWalk

    public ConcurrentWalk(AbstractCharacter c,
                          Path path,
                          float speed)

  Creates a new walking action with the specified path that provides the waypoints to the target location.

  Parameters:
    `c` - the character that walks
    `path` - path to walk for the character
    `speed` - speed factor to use for walking

### ConcurrentWalk

    public ConcurrentWalk(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.

  Parameters:
    `c` - the character that walks
    `path` - path to walk for the character
    `speed` - speed factor to use for walking
    `animName` - name of the animation to play while the action is active

Method Detail

### getTargetX

    public float getTargetX()

  Returns the x-coordinate of the walking target position

  Returns:
    target x-coordinate

### getTargetZ

    public float getTargetZ()

  Returns the z-coordinate of the walking target position

  Returns:
    target z-coordinate

### hasArrivedAtTarget

    public boolean hasArrivedAtTarget()

  Returns whether the character has arrived at its designated target location.

  Returns:
    has arrived at target location? --> true=yes, false=no

### update

    public void update(long elapsedTime)

  Description copied from class: `AbstractConcurrentAction`
  This method updates the concurrent game action

  Specified by:
    `update` in class `AbstractConcurrentAction`
  Parameters:
    `elapsedTime` - time between two frames

### draw

    public void draw(javax.media.opengl.GL gl)

  Description copied from class: `AbstractConcurrentAction`
  This method renders the concurrent game action, if needed.

  Specified by:
    `draw` in class `AbstractConcurrentAction`

### finishUp

    public void finishUp()

  Description copied from class: `AbstractConcurrentAction`
  Implementations of this method hold code that needs to be called before the game action can be removed from the concurrent queue (prematurely) without causing side effects.

  Specified by:
    `finishUp` in class `AbstractConcurrentAction`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD