|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.adom.jade.kernel.GUIDCarrier
de.adom.jade.kernel.DefaultActor
An actor is an abstract JADE concept for anything that can happen at a predetermined point in time. This simulates both one-time events (like exploding magical bombs), repetetitive events (like a log floating downstream) or intelligent beings (like monsters or the PC).
| Constructor Summary | |
|---|---|
DefaultActor()
|
|
| Method Summary | |
|---|---|
abstract void |
act()
Executes an action at a predetermined point in time. |
void |
actAgainAfter(long timeToPass)
Reposts this actor to the actor queue of the current location after a certain amount of time has passed. |
long |
getActionPoint()
Returns the point in time when this event is going to happen. |
boolean |
isValid()
Determines whether this action still is going to happen when the time has come. |
void |
setActionPoint(long pointInTime)
Sets the point in time when this actor is going to act. |
| Methods inherited from class de.adom.jade.kernel.GUIDCarrier |
|---|
getGUID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultActor()
| Method Detail |
|---|
public abstract void act()
act in interface Actorpublic void setActionPoint(long pointInTime)
pointInTime - the point in time when this actor is
going to actpublic long getActionPoint()
getActionPoint in interface Actorpublic boolean isValid()
isValid in interface Actortrue; by default all actors are always
validpublic void actAgainAfter(long timeToPass)
timeToPass - the amount of time to pass before this actor
is allowed to act again (in ticks)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||