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, velocity
eventList, property
DEFAULT_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, stopHere
coldReset, dumpDoMethods, dumpDoMethodsStr, dumpNamesAndSignatures, dumpNamesAndSignaturesStr, getFullMethodName, getSignatureString, handleSimEvent, isAssignableFrom, isDebug, processSimEvent, setDebug, stopAtTime, stopOnTime
addPropertyChangeListener, 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, waitDelay
addSimEventListener, getSimEventListeners, notifyListeners, removeSimEventListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accelerate, accelerate, doEndMove, doStartMove, getMaxSpeed, getMovementState, isMoving, magicMove, move, moveTo, moveTo, paramString, pause, setLocation, setMaxSpeed, stop
getAcceleration, getLocation, getVelocity
getEventListID, setEventListID
addSimEventListener, getSimEventListeners, notifyListeners, removeSimEventListener
processSimEvent
isPersistant, isReRunnable, setPersistant
getEventList, getPriority, getSerial, handleSimEvent, interrupt, interrupt, interruptAll, interruptAll, interruptAll, interruptAllWithArgs, interruptAllWithArgs, setPriority, waitDelay, waitDelay
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getAddedProperties, getProperty, getProperty, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setProperty
public 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 ReRunnable
reset
in class UniformLinearMover
public void doRun()
public void hit(Damage damage)
public boolean isAlive()
public void kill()
public java.lang.String toString()
toString
in class UniformLinearMover