game.weapons
Class Projectile

java.lang.Object
  extended bygame.physics.Body
      extended bygame.physics.MovingBody
          extended bygame.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)
           
 
Method Summary
 void collide(Body body)
           
 void destruct()
           
 java.awt.Color getColor()
           
 DefaultController getController()
           
 Body getFirer()
           
 double getSpoof()
           
 boolean integrate(double timestep, double density)
           
 boolean isDead()
           
 boolean isPenetrator()
           
 void setMode(int mode)
           
 void setPenetrator(boolean isPenetrator)
           
 void setTarget(Body target)
           
 void timeout(double timestep)
           
 java.lang.String toString()
           
 void trySpoof(double timestep)
           
 
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
 

Constructor Detail

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)
Method Detail

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()