Beispiel #1
0
 private void remove()
 {
     Dispose(true);
     Game.Components.Remove(this);
     Visible = false;
     NotifyDead.Invoke();
 }
Beispiel #2
0
 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);
         }
     }
 }