public class CircularImpactMunition extends BasicLinearMover implements Munition
| Modifier and Type | Field and Description |
|---|---|
private java.awt.geom.Point2D |
aimPoint
The center of the circle affected by this Munition.
|
private static java.text.DecimalFormat |
df
A default format for displaying numbers.
|
private boolean |
expended
True if this Munition has been fired.
|
private double |
range
The radius of the circle affected by the Munition.
|
currentSpeed, destination, FORM, lastStopLocation, NaP, startMoveTime, velocityeventList, propertyDEFAULT_ENTITY_NAME, DEFAULT_EVENT_NAME, DEFAULT_PRIORITY, EVENT_METHOD_PREFIX, NL| Constructor and Description |
|---|
CircularImpactMunition()
Zero-parameter constructor for Javabeans support and for instantiating
from data.
|
CircularImpactMunition(java.awt.geom.Point2D location,
double speed,
double range)
Constructs a new CircularImpactMunition.
|
CircularImpactMunition(java.lang.String name,
java.awt.geom.Point2D location,
double speed,
double range)
Constructs a new CircularImpactMunition.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doEndMove(Mover munition)
Stops this Munition at the aimpoint and schedules the Impact event for
now.
|
void |
doFire(java.awt.geom.Point2D aimPoint)
Causes this Munition to move to the given aimpoint.
|
void |
doImpact(Munition munition)
It is up to a MunitionTargetReferee to determine the effect of the Impact
event.
|
java.awt.geom.Point2D |
getAimPoint()
Returns a copy of the aimpoint.
|
java.awt.Shape |
getImpact()
Returns a Shape that is a circle with radius equal to the impactRange
centered on the aimpoint.
|
double |
getImpactRange()
The radius of the circular area that this Munition effects.
|
boolean |
isExpended() |
void |
reset()
Returns the Munition to its original location in an un-expended state.
|
void |
setAimPoint(java.awt.geom.Point2D aimPoint) |
java.lang.String |
toString()
A default string description of this entity, name (Entity Priority)
<list of all properties as key = value pairs>
|
doMoveTo, doMoveTo, doOrderStop, doRun, doStartMove, doStop, getCurrentLocation, getCurrentSpeed, getDestination, getInitialLocation, getLastStopLocation, getMaxSpeed, getStartMoveTime, getVelocity, isMoving, paramString, setInitialLocation, setMaxSpeedcoldReset, 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, waitdoStartMove, doStop, getCurrentLocation, getMaxSpeed, 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, setPropertyprivate java.awt.geom.Point2D aimPoint
private double range
private boolean expended
private static java.text.DecimalFormat df
public CircularImpactMunition()
public CircularImpactMunition(java.lang.String name,
java.awt.geom.Point2D location,
double speed,
double range)
name - The name of this Munition.location - The initial location of this Munition.speed - The speed of this Munition.range - The radius of the circular area of effect for this Munition.public CircularImpactMunition(java.awt.geom.Point2D location,
double speed,
double range)
location - The initial location of this Munition.speed - The speed of this Munition.range - The radius of the circular area of effect for this Munition.public void reset()
reset in interface ReRunnablereset in class BasicLinearMoverpublic void doFire(java.awt.geom.Point2D aimPoint)
aimPoint - given aimpointpublic void doEndMove(Mover munition)
doEndMove in class BasicLinearMovermunition - this Munitionpublic java.awt.geom.Point2D getAimPoint()
getAimPoint in interface Munitionpublic double getImpactRange()
getImpactRange in interface Munitionpublic java.awt.Shape getImpact()
public boolean isExpended()
isExpended in interface Munitionpublic java.lang.String toString()
BasicSimEntitytoString in class BasicLinearMoverpublic void doImpact(Munition munition)
public void setAimPoint(java.awt.geom.Point2D aimPoint)
setAimPoint in interface MunitionaimPoint - Given aimPoint