Take damage from bullets
This commit is contained in:
Binary file not shown.
@@ -219,5 +219,15 @@ namespace EvilSatellites.Objects
|
|||||||
{
|
{
|
||||||
sfxTaps.Play();
|
sfxTaps.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override public void OnCollision(IGameObject obj)
|
||||||
|
{
|
||||||
|
if (obj.Type == ObjectType.Projectile)
|
||||||
|
{
|
||||||
|
var proj = (Projectile)obj;
|
||||||
|
if (proj.Owner == this) return;
|
||||||
|
TakeDamage(rnd.Next(20));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user