private static void ReleaseCollision(Tank tank, Missile missle) { if (tank.CurrentMissle != missle) { tank.Destroy(); missle.Destroy(); } }
/// <summary> If hit by a bullet </summary> /// <param name="hit"> The bullet </param> public virtual void Hit(Missile hit) { float dammage = hit.Dammage(Friendly); HP -= dammage; hit.Destroy(); hit.Explode(); }
public static void ReleaseCollision(Missile missile, Sprite sprite) { missile.Destroy(); if (missile.TeamNumber != sprite.TeamNumber || sprite is Missile) { sprite.Destroy(); } }