Add most AI lines

This commit is contained in:
2021-04-24 18:47:51 +02:00
parent b4f2e85503
commit a7765e5355
13 changed files with 159 additions and 3 deletions
+6
View File
@@ -189,6 +189,7 @@ namespace EvilSatellites.Objects
{
IsDamaged = true;
sfxDamage.Play();
Screen.Manager.Computer.Play("LowHealth");
}
string dmgSound = @"sfx/physics/collisions/";
if (dmg > 60)
@@ -231,10 +232,15 @@ namespace EvilSatellites.Objects
override public void OnCollision(IGameObject obj)
{
if (obj.Type == ObjectType.Debris)
{
Screen.Manager.Computer.Play("DamageDebris");
}
if (obj.Type == ObjectType.Projectile)
{
var proj = (Projectile)obj;
if (proj.Owner == this) return;
Screen.Manager.Computer.Play("DamageBullet");
TakeDamage(rnd.Next(20));
}
}