private void remove() { Dispose(true); Game.Components.Remove(this); Visible = false; NotifyDead.Invoke(); }
public override void Collided(ICollidable i_CollidingObject) { if (i_CollidingObject is Bullet) { Bullet collidingBullet = i_CollidingObject as Bullet; if (collidingBullet.Shooter is PlayerSpaceship) { Animations["DieAnimator"].Resume(); m_KillSoundEffect.CreateInstance().Play(); NotifyDead.Invoke(m_Worth, collidingBullet.Shooter); IsActive = false; m_Comander.DecreaseOneEnemy(this); } } }