예제 #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);
 }