public class TeleporterBehavior extends Behavior implements MessageCallback
Behavior.CommandMessage, Behavior.EventMessage, Behavior.LinkedAggroMessage| Modifier and Type | Field and Description |
|---|---|
protected boolean |
activated |
protected Point |
destination |
protected int |
radius |
LINKED_AGGRO_GET, LINKED_AGGRO_RADIUS, LINKED_AGGRO_SEND, LINKED_CHASING_DISTANCE, lock, MSG_TYPE_COMMAND, MSG_TYPE_EVENT, MSG_TYPE_LINKED_AGGRO, objNO_FLAGS, RESPONSE_EXPECTED| Constructor and Description |
|---|
TeleporterBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
deactivate() |
Point |
getDestination() |
int |
getRadius() |
void |
handleMessage(Message msg,
int flags)
Handle message.
|
void |
initialize() |
void |
reaction(ObjectTracker.NotifyReactionRadiusMessage nMsg) |
void |
setDestination(Point loc) |
void |
setRadius(int radius) |
dispatchMessage, getObjectStub, SendCommand, SendLinkedAggro, setObjectStubprotected int radius
protected Point destination
protected boolean activated
public void initialize()
initialize in class Behaviorpublic void deactivate()
deactivate in class Behaviorpublic void handleMessage(Message msg, int flags)
MessageCallbackhandleMessage in interface MessageCallbackhandleMessage in class Behaviormsg - Message sent from other agent.flags - Bitwise OR of MessageCallback.NO_FLAGS, MessageCallback.RESPONSE_EXPECTED.public void reaction(ObjectTracker.NotifyReactionRadiusMessage nMsg)
public void setRadius(int radius)
public int getRadius()
public void setDestination(Point loc)
public Point getDestination()