public override void Collide(Actor other, Rectangle collision) { if (other.GetType().IsAssignableFrom(typeof(StandardShip)) && !Immortal) { Die(); } }
public override void Collide(Actor other, Rectangle collision) { if (Dying) { return; } if (other.GetType().IsAssignableFrom(typeof(StandardShip))) { Die(); return; } }
public override void Collide(Actor other, Rectangle collision) { if (Dying) { return; } if (other.GetType() == typeof(MainShip)) { Die(); return; } if (other.GetType() == typeof(Bullet)) { var theBullet = (Bullet)other; TakeDamage(theBullet.Power); Flashing = true; } }