コード例 #1
0
 /// <summary>
 /// MakeDying mmoves an enemy from the living collection to the dying collection (unless it hit the centre).
 /// The dying collection is used to store enemies until the AudioEngine is ready to make a sound for them.
 /// </summary>
 public void MakeDying(EnemyTimeWho etw)
 {
     Living.Remove(etw.enemy);
     //A 'who' of -1 signifies that the enemy was removed by reaching the centre, rather than being destroyed by a player
     if (etw.who > -1)
     {
         dying.Add(etw);
     }
 }
コード例 #2
0
 /// <summary>
 /// Kill is called by the AudioEngine and moves an enemy from dying to dead, which allows the VideoEngine
 /// to play its death animation, and also fires the DeadEnemy event.
 /// </summary>
 public void Kill(EnemyTimeWho etw)
 {
     dying.Remove(etw);
     if (DeadEnemy != null)
     {
         DeadEnemy(this, new EnemyArgs(etw.enemy));
     }
     Players[etw.who].Killed(etw.enemy);
     dead.Add(new EnemyTimeWho(etw.enemy, LastUpdate, etw.who));
 }
コード例 #3
0
 /// <summary>
 /// Cremate removes an enemy from the dead collection, and is called by the VideoEngine once the death
 /// animation is done. The enemy is then no longer referred to and is garbage-collected.
 /// </summary>
 public void Cremate(EnemyTimeWho etw)
 {
     dead.Remove(etw);
 }
コード例 #4
0
 /// <summary>
 /// Cremate removes an enemy from the dead collection, and is called by the VideoEngine once the death
 /// animation is done. The enemy is then no longer referred to and is garbage-collected. 
 /// </summary>
 public void Cremate(EnemyTimeWho etw)
 {
   dead.Remove(etw);
 }
コード例 #5
0
 /// <summary>
 /// Kill is called by the AudioEngine and moves an enemy from dying to dead, which allows the VideoEngine
 /// to play its death animation, and also fires the DeadEnemy event.
 /// </summary>
 public void Kill(EnemyTimeWho etw)
 {
   dying.Remove(etw);
   if (DeadEnemy != null) DeadEnemy(this, new EnemyArgs(etw.enemy));
   Players[etw.who].Killed(etw.enemy);
   dead.Add(new EnemyTimeWho(etw.enemy, LastUpdate, etw.who));
 }
コード例 #6
0
 /// <summary>
 /// MakeDying mmoves an enemy from the living collection to the dying collection (unless it hit the centre).
 /// The dying collection is used to store enemies until the AudioEngine is ready to make a sound for them.
 /// </summary>
 public void MakeDying(EnemyTimeWho etw)
 {
   Living.Remove(etw.enemy);
   //A 'who' of -1 signifies that the enemy was removed by reaching the centre, rather than being destroyed by a player
   if (etw.who > -1)
   {
     dying.Add(etw);
   }
 }