Ejemplo n.º 1
0
 public override void InfectedUpdate()
 {
     NormalMovement();
     actCounter++;
     if (actCounter % 30 == 0)
     {
         health -= 10;
         if (health > 0)
         {
             LightGunship gunner = new LightGunship(Position, Vector2.Zero, rotation, team);
             gunner.CarrierLag(30);
         }
     }
 }
Ejemplo n.º 2
0
 public override void ActionUpdate()
 {
     NormalMovement();
     actCounter++;
     if (spawn)
     {
         if (actCounter % 30 == 0)
         {
             Sounds.carierLaunch.Play();
             LightGunship gunner = new LightGunship(Position, new Vector2(home.X - childSpread / 2 + (Children.Count + 1) * childSpread / 4, home.Y + childrenHomeDistance), rotation, team);
             gunner.CarrierLag((childrenHomeDistance - 20) / 3);
             Children.Add(gunner);
             Miasma.enemyFleet.Add(gunner);
         }
         if (Children.Count >= 3)
         {
             acting = -1;
         }
     }
     else
     {
         if (actCounter < 30)
         {
             gunOutAmount = gunOutAmountMax * ((float)actCounter / 30f);
         }
         if (actCounter == 60 || actCounter == 90)
         {
             Shoot();
         }
         if (actCounter > 90)
         {
             gunOutAmount = gunOutAmountMax * (1f - ((float)(actCounter - 90) / 30f));
         }
         if (actCounter >= 120)
         {
             acting = -1;
         }
     }
 }