示例#1
0
        public Missile(double x, double y, double velocity, double heading, MissileProgram program)
        {
            this.x = x;
            this.y = y;

            this.velocity = velocity;
            this.heading = heading;
            this.bearing = heading;

            dX = Math.Sin(heading) * velocity;
            dY = Math.Cos(heading) * velocity;

            this.program = program;
            this.target = this;
        }
示例#2
0
 public void setTarget(Missile target)
 {
     this.target = target;
 }
示例#3
0
 public virtual void execute(Missile missile)
 {
     // do nothing by default
 }
示例#4
0
 public int priority(Missile missile)
 {
     return _priority;
 }
示例#5
0
 public bool eligible(Missile missile)
 {
     return eligibility.getValue(missile);
 }