Very basic crash functionality

This commit is contained in:
2021-04-21 14:14:14 +02:00
parent e5f6399736
commit c3c42506fa
8 changed files with 20 additions and 4 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ namespace EvilSatellites.Objects
var player = (Player)obj;
if (player.Vacuuming)
{
player.CurrentWeapon.RemainingAmmo += rnd.Next(player.CurrentWeapon.MaxAmmo);
player.CurrentWeapon.Reload(rnd.Next(player.CurrentWeapon.MaxAmmo));
Destroy();
return;
}
+7
View File
@@ -203,6 +203,13 @@ namespace EvilSatellites.Objects
}
dmgSound += "/int/" + (rnd.Next(2)+1).ToString()+".wav";
Screen.Manager.Sound.PlayOneshot(dmgSound);
if (Health < 1)
{
Destroy();
Screen.Manager.Sound.PlayOneshot(@"sfx/physics/crashes/1.wav");
System.Threading.Thread.Sleep(2000);
Environment.Exit(0);
}
}
public void IncreaseHealth(float amount)