public class SimpleTarget extends UniformLinearMover implements Target
| Modifier and Type | Field and Description |
|---|---|
private boolean |
alive
True if this SimpleTarget is alive.
|
destination, df, lastStopLocation, maxSpeed, movementState, moveTime, nextVelocity, ORIGIN, originalLocation, param, startMoveTime, velocityeventList, propertyDEFAULT_ENTITY_NAME, DEFAULT_EVENT_NAME, DEFAULT_PRIORITY, EVENT_METHOD_PREFIX, NL| Constructor and Description |
|---|
SimpleTarget(java.awt.geom.Point2D location,
double maxSpeed)
Creates a new instance of SimpleTarget starting at the given location
with the given maximum speed.
|
SimpleTarget(java.lang.String name,
java.awt.geom.Point2D location,
double maxSpeed)
Creates a new instance of SimpleTarget starting at the given location
with the given maximum speed and the given name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doRun()
Fires a propertyChange for "alive"
|
void |
hit(Damage damage)
Does nothing.
|
boolean |
isAlive()
Returns true if this Target is alive.
|
void |
kill()
Kills this Target (sets alive to false).
|
void |
reset()
Returns this to its original location, and makes it alive.
|
java.lang.String |
toString()
Returns a String containing the name, current location, current velocity,
and whether alive or not.
|
accelerate, accelerate, doEndMove, doStartMove, formatPoint, formatPoint, getAcceleration, getLocation, getMaxSpeed, getMovementState, getResetLocation, getVelocity, isMoving, magicMove, main, move, moveTo, moveTo, paramString, pause, setLocation, setMaxSpeed, setMovementState, stop, stopHerecoldReset, dumpDoMethods, dumpDoMethodsStr, dumpNamesAndSignatures, dumpNamesAndSignaturesStr, getFullMethodName, getSignatureString, handleSimEvent, isAssignableFrom, isDebug, processSimEvent, setDebug, stopAtTime, stopOnTimeaddPropertyChangeListener, addPropertyChangeListener, attemptSchedule, clearAddedProperty, compareTo, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAddedProperties, getEventList, getEventListID, getName, getPriority, getPropertiesString, getProperty, getProperty, getPropertyChangeListeners, getSerial, interrupt, interrupt, interruptAll, interruptAll, interruptAll, interruptAllWithArgs, interruptAllWithArgs, isClearAddedPropertiesOnReset, isJustDefinedProperties, isPersistant, isReRunnable, isVerbose, parametersMatch, removePropertyChangeListener, removePropertyChangeListener, resetNextSerial, setClearAddedPropertiesOnReset, setEventList, setEventListID, setJustDefinedProperties, setName, setPersistant, setPriority, setProperty, setVerbose, waitDelay, waitDelay, waitDelay, waitDelayaddSimEventListener, getSimEventListeners, notifyListeners, removeSimEventListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaccelerate, accelerate, doEndMove, doStartMove, getMaxSpeed, getMovementState, isMoving, magicMove, move, moveTo, moveTo, paramString, pause, setLocation, setMaxSpeed, stopgetAcceleration, getLocation, getVelocitygetEventListID, setEventListIDaddSimEventListener, getSimEventListeners, notifyListeners, removeSimEventListenerprocessSimEventisPersistant, isReRunnable, setPersistantgetEventList, getPriority, getSerial, handleSimEvent, interrupt, interrupt, interruptAll, interruptAll, interruptAll, interruptAllWithArgs, interruptAllWithArgs, setPriority, waitDelay, waitDelayaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getAddedProperties, getProperty, getProperty, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setPropertypublic SimpleTarget(java.awt.geom.Point2D location,
double maxSpeed)
location - Given starting location of this SimpleTargetmaxSpeed - Given maximum speed of this SimpleTargetpublic SimpleTarget(java.lang.String name,
java.awt.geom.Point2D location,
double maxSpeed)
name - Given name of this SimpleTargetlocation - Given starting location of this SimpleTargetmaxSpeed - Given maximum speed of this SimpleTargetpublic void reset()
reset in interface ReRunnablereset in class UniformLinearMoverpublic void doRun()
public void hit(Damage damage)
public boolean isAlive()
public void kill()
public java.lang.String toString()
toString in class UniformLinearMover