public class PatrolBehavior extends Behavior implements MessageCallback, java.lang.Runnable
Behavior.CommandMessage, Behavior.EventMessage, Behavior.LinkedAggroMessage| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<java.lang.Float> |
lingerTimes |
protected float |
speed |
boolean |
wasInCombat |
protected java.util.List<Point> |
waypoints |
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 |
|---|
PatrolBehavior() |
PatrolBehavior(SpawnData data) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addLingerTime(float time) |
void |
addWaypoint(Point wp) |
void |
deactivate() |
java.util.List<java.lang.Float> |
getLingerTimes() |
float |
getMovementSpeed() |
void |
handleMessage(Message msg,
int flags)
Handle message.
|
void |
initialize() |
void |
nextPatrol() |
void |
run() |
protected void |
sendMessage(Point waypoint,
float speed) |
void |
setMovementSpeed(float speed) |
protected void |
startPatrol()
Calculate the current position of the mob and work out where along the chain they are
|
dispatchMessage, getObjectStub, SendCommand, SendLinkedAggro, setObjectStubprotected java.util.List<Point> waypoints
protected java.util.List<java.lang.Float> lingerTimes
protected float speed
public boolean wasInCombat
public PatrolBehavior()
public PatrolBehavior(SpawnData data)
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 addWaypoint(Point wp)
public void addLingerTime(float time)
public java.util.List<java.lang.Float> getLingerTimes()
public void setMovementSpeed(float speed)
public float getMovementSpeed()
protected void startPatrol()
protected void sendMessage(Point waypoint, float speed)
public void nextPatrol()
public void run()
run in interface java.lang.Runnable