game.ai
Class DefaultController

java.lang.Object
  extended bygame.ai.Controller
      extended bygame.ai.DefaultController

public class DefaultController
extends Controller


Field Summary
static double GUN_ANGLE_OFFSET
           
static double LEAD_PREDICT_FACTOR
           
static double TAIL_ANGLE_OFFSET
           
static double TRAIL_FACTOR
           
static double VIEW_ANGLE_OFFSET
           
 
Fields inherited from class game.ai.Controller
BEAM_PURSUE_MODE, GUN_ATTACK_MODE, IFF_PURSUE_MODE, LAG_PURSUE_MODE, LEAD_PURSUE_MODE, MAINTAIN_HEADING_SPEED_MODE, MISSILE_ATTACK_MODE, MODE_NAMES, MOVE_TO_POSITION_MODE, PENETRATING_MISSILE_ATTACK_MODE, printGunfire, printMissileFire, printOrders, REAR_MISSILE_ATTACK_MODE, SPIN_MODE, SPLIT_MISSILE_ATTACK_MODE, STOP_MODE, TAIL_PURSUE_MODE, TRAIL_PURSUE_MODE
 
Constructor Summary
DefaultController()
           
 
Method Summary
 boolean atTargetPosition(MovingBody mbody)
           
 void decoy(Projectile p)
           
 Body getTarget()
           
 double getTimeBetweenDecoys()
           
 double getTimeSinceLastDecoy()
           
 void integrate(MovingBody mbody, double timestep)
           
 void setTarget(Body target)
           
 void setTargetPosition(double x, double y)
           
 void setTargetPosition(Vector2D position)
           
 void setTimeBetweenDecoys(double timeBetweenDecoys)
           
 void setTimeSinceLastDecoy(double timeSinceLastDecoy)
           
 
Methods inherited from class game.ai.Controller
getMode, isCloaked, isWeaponsFree, setCloaked, setMode, setWeaponsFree
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRAIL_FACTOR

public static final double TRAIL_FACTOR
See Also:
Constant Field Values

LEAD_PREDICT_FACTOR

public static final double LEAD_PREDICT_FACTOR
See Also:
Constant Field Values

GUN_ANGLE_OFFSET

public static final double GUN_ANGLE_OFFSET
See Also:
Constant Field Values

VIEW_ANGLE_OFFSET

public static final double VIEW_ANGLE_OFFSET
See Also:
Constant Field Values

TAIL_ANGLE_OFFSET

public static final double TAIL_ANGLE_OFFSET
See Also:
Constant Field Values
Constructor Detail

DefaultController

public DefaultController()
Method Detail

integrate

public void integrate(MovingBody mbody,
                      double timestep)

setTargetPosition

public void setTargetPosition(Vector2D position)

setTargetPosition

public void setTargetPosition(double x,
                              double y)

atTargetPosition

public boolean atTargetPosition(MovingBody mbody)

decoy

public void decoy(Projectile p)

setTarget

public void setTarget(Body target)

getTarget

public Body getTarget()

getTimeBetweenDecoys

public double getTimeBetweenDecoys()

setTimeBetweenDecoys

public void setTimeBetweenDecoys(double timeBetweenDecoys)

getTimeSinceLastDecoy

public double getTimeSinceLastDecoy()

setTimeSinceLastDecoy

public void setTimeSinceLastDecoy(double timeSinceLastDecoy)