public abstract class Droppable
extends java.lang.Object
implements java.io.Serializable
Droppables don't move, so there are no motion targets for them. They may collide with panzers.
Relevant aspects:
Modifier and Type | Field and Description |
---|---|
protected double |
age
Age since deployment in [s];
|
protected java.awt.Color |
bodyColor |
protected boolean |
isArmed |
protected boolean |
isDetonating |
protected double |
maxAge |
protected int |
ownerID |
protected Vector |
pos |
Modifier | Constructor and Description |
---|---|
protected |
Droppable(Vector pos,
int ownerID,
java.awt.Color color)
Constructor to rely on by descendants.
|
Modifier and Type | Method and Description |
---|---|
void |
calculateMotion(SimulationState state,
double elapsedTime)
Actually, Droppables procure no movement.
|
abstract void |
checkTrigger(SimulationState state,
MotionTargetPanzer panzerTgt)
is called to detect collisions.
|
abstract Droppable |
clone() |
abstract Collision |
discoverCollision(MotionTargetLaunchable projTgt)
Constructs the Droppable's individual collision with the specified Launchable
|
abstract Collision |
discoverCollision(MotionTargetPanzer panzerTgt)
Constructs the Droppable's individual collision with the specified Panzer
|
abstract void |
draw(javax.media.opengl.GL gl,
ArenaController arenaController,
double timestamp)
Draws the object on the given arena.
|
abstract double |
DROPPER_REFRACTORY_PERIOD()
Time until dropper gear can be reactivated after drop.
|
double |
getAge() |
java.awt.Color |
getColor() |
double |
getMaxAge() |
int |
getOwnerID() |
Vector |
getPos() |
boolean |
isArmed() |
boolean |
isDetonating() |
abstract double |
LAUNCHABLE_TRIGGER_RADIUS()
trigger radius [m] for Launchables to set up the Droppable's effect (explosions etc.).
|
abstract double |
LIFE_TIME_AVG()
Average life time [s] of this Droppable.
|
abstract double |
TRIGGER_RADIUS()
trigger radius [m] for Panzers to set up Droppable's effect (explosions etc.).
|
protected double age
As descendant: DO NOT MODIFY!
protected java.awt.Color bodyColor
protected boolean isArmed
protected transient boolean isDetonating
protected double maxAge
protected int ownerID
protected Vector pos
protected Droppable(Vector pos, int ownerID, java.awt.Color color)
pos
- ownerID
- color
- public final void calculateMotion(SimulationState state, double elapsedTime)
SOMETIME: remove final flag if needed. If done, always make super call first.
elapsedTime
- since last call [s]public abstract void checkTrigger(SimulationState state, MotionTargetPanzer panzerTgt)
May be overridden to implement individual behavior.
state
- panzerTgt
- public abstract Droppable clone()
clone
in class java.lang.Object
public abstract Collision discoverCollision(MotionTargetLaunchable projTgt)
public abstract Collision discoverCollision(MotionTargetPanzer panzerTgt)
public abstract void draw(javax.media.opengl.GL gl, ArenaController arenaController, double timestamp)
public abstract double DROPPER_REFRACTORY_PERIOD()
Every descendant may have its own value.
public final double getAge()
public final java.awt.Color getColor()
public final double getMaxAge()
public final int getOwnerID()
public final Vector getPos()
public final boolean isArmed()
public final boolean isDetonating()
public abstract double LAUNCHABLE_TRIGGER_RADIUS()
Note that this value only applies to approaching Launchables.
Every descendant may have its own value.
public abstract double LIFE_TIME_AVG()
The actual life time will be subject of normal distribution.
Every descendant may have its own value.
public abstract double TRIGGER_RADIUS()
Also determines the activation distance.
(see Droppable#calculateMotion)
Every descendant may have its own value.