game.weapons
Class Projectile
java.lang.Object
game.physics.Body
game.physics.MovingBody
game.weapons.Projectile
- Direct Known Subclasses:
- SplitProjectile
- public class Projectile
- extends MovingBody
Constructor Summary |
Projectile(Body unit,
double damage,
double duration,
double spoof,
boolean isPenetrator,
double radius,
double mass,
double maxSpeed,
double acceleration,
double maxAngularVelocity,
double angularAcceleration)
|
Projectile(double heading,
Body unit,
double damage,
double duration,
double spoof,
boolean isPenetrator,
double radius,
double mass,
double maxSpeed,
double acceleration,
double maxAngularVelocity,
double angularAcceleration)
|
Methods inherited from class game.physics.MovingBody |
applyForce, getDensityEffect, getMaxAngularVelocity, getMaxSpeed, getVelocity, integrate, predictPosition, predictVelocity, reportMotionStatus, setTargetHeading, setTargetVelocity, setVelocity |
Methods inherited from class game.physics.Body |
findBearing, findHeading, findHeading, getBounds, getHeading, getPlayer, getPlayerID, getPosition, init, init, isColliding, normalize, setHeading, setPosition, setPosition |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Projectile
public Projectile(Body unit,
double damage,
double duration,
double spoof,
boolean isPenetrator,
double radius,
double mass,
double maxSpeed,
double acceleration,
double maxAngularVelocity,
double angularAcceleration)
Projectile
public Projectile(double heading,
Body unit,
double damage,
double duration,
double spoof,
boolean isPenetrator,
double radius,
double mass,
double maxSpeed,
double acceleration,
double maxAngularVelocity,
double angularAcceleration)
setMode
public void setMode(int mode)
setTarget
public void setTarget(Body target)
trySpoof
public void trySpoof(double timestep)
collide
public void collide(Body body)
- Overrides:
collide
in class MovingBody
- See Also:
Body.collide(game.physics.Body)
integrate
public boolean integrate(double timestep,
double density)
- Overrides:
integrate
in class MovingBody
- See Also:
MovingBody.integrate(double, double)
timeout
public void timeout(double timestep)
destruct
public void destruct()
isDead
public boolean isDead()
- Specified by:
isDead
in class Body
- See Also:
Body.isDead()
getColor
public java.awt.Color getColor()
- Overrides:
getColor
in class Body
isPenetrator
public boolean isPenetrator()
setPenetrator
public void setPenetrator(boolean isPenetrator)
getSpoof
public double getSpoof()
getFirer
public Body getFirer()
toString
public java.lang.String toString()
- See Also:
Object.toString()
getController
public DefaultController getController()