Example #1
0
 public override bool HitCheck(BaseObject MyPlane)
 {
     return(false);
 }
Example #2
0
 public override void Ctrl()
 {
     base.Ctrl();
     if (this.Target == null && !this.targetFlag)
     {
         double dist = 300.0;
         this.EnemyPlaneList.ForEach((Action <BaseEnemyPlane>)(x =>
         {
             if (!x.HitEnabled)
             {
                 return;
             }
             double distance = this.GetDistance((BaseObject)x);
             if (distance < dist)
             {
                 this.Target = (BaseObject)x;
                 dist        = distance;
             }
         }));
     }
     else
     {
         this.targetFlag = true;
     }
     if (this.Target != null)
     {
         if ((double)this.Target.HealthPoint > 0.0)
         {
             double direction1 = this.GetDirection(this.Target);
             double direction2 = this.Direction;
             if (direction1 > Math.PI)
             {
                 direction1 -= 2.0 * Math.PI;
             }
             if (direction2 > Math.PI)
             {
                 direction2 -= 2.0 * Math.PI;
             }
             double num = direction1 - direction2;
             if (num > Math.PI)
             {
                 num -= 2.0 * Math.PI;
             }
             if (Math.Abs(num) > 0.0199999995529652 && this.GetDistance(this.Target) > 50.0)
             {
                 this.Direction += num / 5.0;
             }
             else
             {
                 this.Direction += num;
             }
         }
         else
         {
             this.Target = (BaseObject)null;
         }
     }
     if (!this.OutBoundary())
     {
         return;
     }
     this.MyBulletList.Remove((BaseObject)this);
 }
Example #3
0
 public override bool HitCheck(BaseObject Target)
 {
     return(false);
 }