public class RadiusRoamBehavior extends Behavior implements java.lang.Runnable
Behavior.CommandMessage, Behavior.EventMessage, Behavior.LinkedAggroMessage| Modifier and Type | Field and Description |
|---|---|
protected boolean |
activated |
protected Point |
centerLoc |
protected boolean |
inCombat |
protected long |
lingerTime |
protected long |
maxLingerTime |
protected long |
minLingerTime |
protected int |
radius |
protected boolean |
randomLingerEachTime |
protected float |
speed |
boolean |
wasInCombat |
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 |
|---|
RadiusRoamBehavior() |
RadiusRoamBehavior(SpawnData data) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
deactivate() |
Point |
getCenterLoc() |
long |
getLingerTime() |
long |
getMaxLingerTime() |
long |
getMinLingerTime() |
float |
getMovementSpeed() |
int |
getRadius() |
boolean |
getRandomLingerEachTime() |
void |
handleMessage(Message msg,
int flags)
Handle message.
|
void |
initialize() |
protected void |
nextRoam() |
void |
run() |
void |
setCenterLoc(Point loc) |
void |
setLingerTime(long time) |
void |
setMaxLingerTime(long maxLingerTime) |
void |
setMinLingerTime(long minLingerTime) |
void |
setMovementSpeed(float speed) |
void |
setRadius(int radius) |
void |
setRandomLingerEachTime(boolean randomLingerEachTime) |
void |
startRoam() |
getObjectStub, SendCommand, SendLinkedAggro, setObjectStubprotected Point centerLoc
protected int radius
protected long lingerTime
protected long minLingerTime
protected long maxLingerTime
protected boolean randomLingerEachTime
protected float speed
public boolean wasInCombat
protected boolean inCombat
protected boolean activated
public RadiusRoamBehavior()
public RadiusRoamBehavior(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 setCenterLoc(Point loc)
public Point getCenterLoc()
public void setRadius(int radius)
public int getRadius()
public void setLingerTime(long time)
public long getLingerTime()
public long getMinLingerTime()
public void setMinLingerTime(long minLingerTime)
public long getMaxLingerTime()
public void setMaxLingerTime(long maxLingerTime)
public boolean getRandomLingerEachTime()
public void setRandomLingerEachTime(boolean randomLingerEachTime)
public void setMovementSpeed(float speed)
public float getMovementSpeed()
public void startRoam()
protected void nextRoam()
public void run()
run in interface java.lang.Runnable