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
+1 -1
View File
@@ -57,7 +57,7 @@ namespace EvilSatellites.Objects
if (player.Vacuuming)
{
player.CurrentWeapon.Reload(rnd.Next(player.CurrentWeapon.MaxAmmo/4));
Screen.Manager.Computer.Play("CollectDebris");
Destroy();
GameStats.DebrisCollected++;
return;
+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));
}
}
+5
View File
@@ -70,6 +70,11 @@ namespace EvilSatellites.Objects
{
var proj = (Projectile)obj;
if (proj.Owner == this) return;
var scr = (GameScreen)Screen;
if (proj.Owner == scr.GetPlayer())
{
scr.Manager.Computer.Play("Hit");
}
}
Health -= 10;
if (obj.Type == ObjectType.Player)