wyvern.kernel.motion
Class MoveEvent
java.lang.Object
wyvern.kernel.properties.PList
wyvern.kernel.commands.EventImpl
wyvern.kernel.motion.MoveEvent
- All Implemented Interfaces:
- Broadcaster, CommandEvent, PropertyList
- Direct Known Subclasses:
- PushCommand.PushEvent
- public class MoveEvent
- extends EventImpl
This event encapsulates the state necessary to execute the
"move" command.
- Version:
- 1.0, Oct 07, 1997
- Author:
- Steve Yegge
Fields inherited from class wyvern.kernel.commands.EventImpl |
agent_, appendToFile_, argString_, argStringParsed_, argv_, argvParsed_, delay_, failureMessage_, filterObjects_, filters_, handler_, map_, modified_, originalText_, playerOriginated_, redirectFile_, redirecting_, sendToAgent_, successMessage_, verb_, vetoed_, wizParsed_ |
Constructor Summary |
MoveEvent(java.lang.String originalText,
Commandable agent)
Constructs a new standard MoveEvent.
|
Method Summary |
java.util.List |
getDest()
Gets the finishing locations for the agent. |
int |
getDirection()
Gets the direction the agent is moving. |
Point |
getOffsets()
Retrieves the direction (x & y) we're going to move. |
java.util.List |
getSource()
Gets the starting locations for the agent. |
void |
setDest(java.util.List dest)
Sets the location list the agent is moving to. |
void |
setDirection(int dir)
Sets the direction to move. |
void |
setOffsets(Point offsets)
Sets the offsets for the move. |
void |
setSource(java.util.List src)
Sets the location list the agent is starting from. |
Methods inherited from class wyvern.kernel.commands.EventImpl |
broadcast, broadcast, broadcast, broadcast, broadcast, checkVeto, fail, filterMessage, findAllMatches, findByHashcode, findInMap, findNeighbor, findObject, findTarget, getAgent, getArgs, getArgString, getDelay, getFailureMessage, getFilterObjects, getFilters, getHandler, getMap, getOriginalText, getRedirectFile, getSuccessMessage, getVerb, hasArgs, isAppending, isModified, isMonster, isPlayer, isPlayerOriginated, isRedirecting, isSendingToAgent, isVetoed, isWizard, main, message, message, noArgs, parseArgString, parseARGV, parseVerb, profileParsing, redirectMessage, runPostHooks, runPreHooks, searchInv, searchInvAndMapNearby, searchInvAndMapUnder, searchInvByHashcode, searchMapNearby, searchMapUnder, searchMapUnderByHashcode, setAgent, setArgs, setDelay, setFailureMessage, setHandler, setMap, setModified, setOriginalText, setPlayerOriginated, setSuccessMessage, setVerb, setVeto, toString, veto |
Methods inherited from class wyvern.kernel.properties.PList |
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, debugProperties, dismantlePropertyList, getDoubleProperty, getInheritedProperty, getInteger, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProfilingInfo, getProperties, getProperties, getPropertiesIncludingTransients, getPropertiesIncludingTransients, getProperty, getSerializableProperties, getSerializableProperty, getStringProperty, getTransientDoubleProperty, getTransientIntProperty, getTransientLongProperty, getTransientProperties, getTransientProperty, hasLocalProperty, hasPersistentProperty, hasProperty, hasTransientProperty, inheritProperty, isReadOnly, isRemoved, isTransientlyRemoved, printLocalProperties, printProperties, printProperties, printTransientProperties, removeProperty, removeTransientProperty, setDoubleProperty, setIntProperty, setLongProperty, setParent, setProperty, setReadOnly, setTransientDoubleProperty, setTransientIntProperty, setTransientLongProperty, setTransientProperty, toString, transientlyRemoveProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wyvern.lib.PropertyList |
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, getDoubleProperty, getInheritedProperty, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProperties, getProperties, getPropertiesIncludingTransients, getPropertiesIncludingTransients, getProperty, getSerializableProperties, getSerializableProperty, getStringProperty, getTransientDoubleProperty, getTransientIntProperty, getTransientLongProperty, getTransientProperties, getTransientProperty, hasLocalProperty, hasPersistentProperty, hasProperty, hasTransientProperty, inheritProperty, isReadOnly, isRemoved, isTransientlyRemoved, printLocalProperties, printProperties, printProperties, printTransientProperties, removeProperty, removeTransientProperty, setDoubleProperty, setIntProperty, setLongProperty, setParent, setProperty, setReadOnly, setTransientDoubleProperty, setTransientIntProperty, setTransientLongProperty, setTransientProperty, toString, transientlyRemoveProperty |
sourceLoc_
protected java.util.List sourceLoc_
destLoc_
protected java.util.List destLoc_
direction_
protected int direction_
offsets_
protected Point offsets_
MoveEvent
public MoveEvent(java.lang.String originalText,
Commandable agent)
- Constructs a new standard MoveEvent.
The event encapsulates all the parameters of the move: the
agent, the command and arguments, the starting locations,
the ending locations, the duration to wait after the move,
and so on.
setSource
public void setSource(java.util.List src)
- Sets the location list the agent is starting from.
- Parameters:
src
- a list of map locations
getSource
public java.util.List getSource()
- Gets the starting locations for the agent.
- Returns:
- the list of points the agent is starting at.
setDest
public void setDest(java.util.List dest)
- Sets the location list the agent is moving to.
- Parameters:
dest
- a list of map locations
getDest
public java.util.List getDest()
- Gets the finishing locations for the agent.
- Returns:
- the list of points the agent is moving to.
setDirection
public void setDirection(int dir)
- Sets the direction to move.
- Parameters:
dir
- a wyvern.lib.Direction constant
getDirection
public int getDirection()
- Gets the direction the agent is moving.
- Returns:
- a wyvern.lib.Direction constant
setOffsets
public void setOffsets(Point offsets)
- Sets the offsets for the move.
- Parameters:
offsets
- the number of squares to move in X and Y
getOffsets
public Point getOffsets()
- Retrieves the direction (x & y) we're going to move.
- Returns:
- a Point object containing the x & y offsets. It's
only a Point object to get multiple return values; the x & y
are used to translate all the source points to the destination
points.