org.haphazard.system.action
Class Action
java.lang.Object
org.haphazard.XML.MessageHandler
org.haphazard.system.action.Action
- Direct Known Subclasses:
- CharacterAction
- public class Action
- extends MessageHandler
General class for handling an action in the world
Constructor Summary |
Action()
Creates a new instance of Action |
Method Summary |
boolean |
equals(java.lang.Object object)
Tests if this action equals another action |
boolean |
perform()
Performs the action |
void |
start(long time)
Starts the action |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mController
protected java.util.Observer mController
mTimeStarted
protected long mTimeStarted
mExecutionTime
protected long mExecutionTime
Action
public Action()
- Creates a new instance of Action
start
public void start(long time)
- Starts the action
- Parameters:
time
- The time the action is considered to be started
perform
public boolean perform()
- Performs the action
- Returns:
- true if terminated for whatever reason
equals
public boolean equals(java.lang.Object object)
- Tests if this action equals another action
- Parameters:
object
- The object to test against