be.saltwater.jaqel.scheduler
Class MoveAction

java.lang.Object
  extended bybe.saltwater.jaqel.scheduler.CreatureAction
      extended bybe.saltwater.jaqel.scheduler.MoveAction

public class MoveAction
extends CreatureAction


Constructor Summary
MoveAction(CreatureActionScheduler scheduler, Creature actor, java.util.List movePath)
           
 
Method Summary
 void actionFinished()
          Called by CreatureActionScheduler when the action is finished.
 int getCost()
          Subclasses should calculate the cost in actionpoints to complete this action in this method
 java.awt.Point getEndLocation()
          If this action modifies the location of the Creature, return the end location, default implementation returns null.
 int isValid()
          Subclasses should return a Creature.ORDER_* status code that indicates if this action is valid. return Creature.ORDER_OK if all is ok.
 
Methods inherited from class be.saltwater.jaqel.scheduler.CreatureAction
actionStarted, addAnimation, animationFinished, getActorCreature, getAnimations, getCreatureActionScheduler, isAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoveAction

public MoveAction(CreatureActionScheduler scheduler,
                  Creature actor,
                  java.util.List movePath)
Method Detail

getCost

public int getCost()
Description copied from class: CreatureAction
Subclasses should calculate the cost in actionpoints to complete this action in this method

Specified by:
getCost in class CreatureAction
See Also:
Creature.getActionPoints()

isValid

public int isValid()
Description copied from class: CreatureAction
Subclasses should return a Creature.ORDER_* status code that indicates if this action is valid. return Creature.ORDER_OK if all is ok.

Specified by:
isValid in class CreatureAction

actionFinished

public void actionFinished()
Description copied from class: CreatureAction
Called by CreatureActionScheduler when the action is finished. Not abstract because you may not need to know this.

Overrides:
actionFinished in class CreatureAction

getEndLocation

public java.awt.Point getEndLocation()
Description copied from class: CreatureAction
If this action modifies the location of the Creature, return the end location, default implementation returns null.

Overrides:
getEndLocation in class CreatureAction