Exemplo n.º 1
0
 private void DoesRockHitPlayer()
 {
     if (ProximitySphere.Intersects(player.ProximitySphere))
     {
         player.GotHit();
         RockDistroyedByPlayer();
     }
 }
Exemplo n.º 2
0
 private void DoesShotHitPlayer()
 {
     if (ProximitySphere.Intersects(player.ProximitySphere))
     {
         Deactivate();
         player.GotHit();
     }
 }
Exemplo n.º 3
0
 private void DoesRockHitSmallUFO()
 {
     if (ProximitySphere.Intersects(UFOs.SmallUFOCollision))
     {
         UFOs.DestroySmallUFO();
         UFOs.Explosion();
         RockDistroyed();
     }
 }
Exemplo n.º 4
0
 private void DoesSmallUFOShotRock()
 {
     for (int shot = 0; shot < UFOs.SmallUFOShots.Count; shot++)
     {
         if (UFOs.SmallUFOShots[shot].Visible)
         {
             if (ProximitySphere.Intersects(UFOs.SmallUFOShots[shot].ProximitySphere))
             {
                 UFOs.SmallUFOShots[shot].Deactivate();
                 RockDistroyed();
             }
         }
     }
 }
Exemplo n.º 5
0
 private void DoesPlayerShootRock()
 {
     for (int shotCount = 0; shotCount < player.Shots.Count; shotCount++)
     {
         if (player.Shots[shotCount].Visible)
         {
             if (ProximitySphere.Intersects(player.Shots[shotCount].ProximitySphere))
             {
                 player.Shots[shotCount].Deactivate();
                 RockDistroyedByPlayer();
             }
         }
     }
 }
Exemplo n.º 6
0
 private void DoesShotHitUFO()
 {
     if (UFOs.LargeUFOEnabled)
     {
         if (ProximitySphere.Intersects(UFOs.LargeUFOCollision))
         {
             player.GotPoints(200);
             Deactivate();
             UFOs.DestroyLargeUFO();
             UFOs.Explosion();
         }
     }
     else if (UFOs.SmallUFOEnabled)
     {
         if (ProximitySphere.Intersects(UFOs.SmallUFOCollision))
         {
             player.GotPoints(1000);
             Deactivate();
             UFOs.DestroySmallUFO();
             UFOs.Explosion();
         }
     }
 }