rlgamekit.scheduler
Class ScheduledAction

java.lang.Object
  extended by rlgamekit.scheduler.ScheduledAction

public abstract class ScheduledAction
extends java.lang.Object

Base class for actions schduled by the scheduler. Timed NPC actions (and maybe also timed PC actions) might be handled by subclasses of this.


Constructor Summary
ScheduledAction(long order)
          Creates a new instance of ScheduledAction
 
Method Summary
abstract  int execute()
          Executes the action linked to this event.
 long getOrder()
          Get the current ordering value of this action.W
 void setOrder(long order)
          Set the time or order when this even is due to happen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduledAction

public ScheduledAction(long order)
Creates a new instance of ScheduledAction

Method Detail

getOrder

public long getOrder()
Get the current ordering value of this action.W

Returns:
the order

setOrder

public void setOrder(long order)
Set the time or order when this even is due to happen.

Parameters:
order - the order to set

execute

public abstract int execute()
Executes the action linked to this event.

Returns:
0 if executions successful, otherwise order increment for repeat.