Exemplo n.º 1
0
 public void HitTarget()
 {
     Active         = false;
     Velocity.Y     = 0;
     Acceleration.Y = 0;
     Explosion.Spawn(Position, Radius * 0.5f, 100);
     ExplodeSound.Play();
 }
Exemplo n.º 2
0
 void CheckHit()
 {
     foreach (TankShot shot in RefGameLogic.RefPlayer.ShotsRef)
     {
         if (shot.Active)
         {
             if (SphereIntersect(shot))
             {
                 Active = false;
                 Explosion.DefuseColor = new Vector3(0.713f, 0.149f, 0.286f);
                 Explosion.Spawn(Position, 5, 30);
                 shot.HitTarget();
                 RefGameLogic.AddToScore(100);
             }
         }
     }
 }
Exemplo n.º 3
0
 public void HitTarget()
 {
     Active = false;
     Explosion.Spawn(Position, Radius * 0.25f, 30);
     HitSound.Play();
 }