multiverse.server.engine
Class BaseBehavior
java.lang.Object
multiverse.server.engine.Behavior
multiverse.server.engine.BaseBehavior
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Runnable, MessageCallback, MessageDispatch
public class BaseBehavior
- extends Behavior
- implements java.lang.Runnable
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lock
protected transient java.util.concurrent.locks.Lock lock
mode
protected java.lang.String mode
roamingBehavior
protected boolean roamingBehavior
activated
protected boolean activated
MSG_CMD_TYPE_GOTO
public static final java.lang.String MSG_CMD_TYPE_GOTO
- See Also:
- Constant Field Values
MSG_CMD_TYPE_FOLLOW
public static final java.lang.String MSG_CMD_TYPE_FOLLOW
- See Also:
- Constant Field Values
MSG_CMD_TYPE_STOP
public static final java.lang.String MSG_CMD_TYPE_STOP
- See Also:
- Constant Field Values
MSG_EVENT_TYPE_ARRIVED
public static final java.lang.String MSG_EVENT_TYPE_ARRIVED
- See Also:
- Constant Field Values
BaseBehavior
public BaseBehavior()
BaseBehavior
public BaseBehavior(SpawnData data)
initialize
public void initialize()
- Overrides:
initialize in class Behavior
activate
public void activate()
- Specified by:
activate in class Behavior
deactivate
public void deactivate()
- Specified by:
deactivate in class Behavior
handleMessage
public void handleMessage(Message msg,
int flags)
- Description copied from interface:
MessageCallback
- Handle message.
- Specified by:
handleMessage in interface MessageCallback- Specified by:
handleMessage in class Behavior
- Parameters:
msg - Message sent from other agent.flags - Bitwise OR of MessageCallback.NO_FLAGS, MessageCallback.RESPONSE_EXPECTED.
gotoSetup
public void gotoSetup(Point dest,
int speed)
gotoUpdate
public void gotoUpdate()
followSetup
public void followSetup(EntityHandle target,
int speed)
scheduleMe
protected void scheduleMe(long timeToDest)
followUpdate
public void followUpdate()
setupPathInterpolator
protected long setupPathInterpolator(long oid,
Point myLoc,
Point dest,
boolean follow,
boolean followsTerrain)
cancelPathInterpolator
protected void cancelPathInterpolator(long oid)
interpolatePath
protected boolean interpolatePath()
run
public void run()
- Specified by:
run in interface java.lang.Runnable
getPathObjectTypeName
protected java.lang.String getPathObjectTypeName()