Exemplo n.º 1
0
 /*
  * Raises the event "AttackBeginning", if an subscription for it exists.
  */
 private void Hero_AttackBeginning(object sender, AttackBeginningArgs e)
 {
     if (AttackBeginning != null)
     {
         new EventHandler <AttackBeginningArgs>(AttackBeginning)
             (this, e);
     }
 }
Exemplo n.º 2
0
 /*
  * When the "AttackBeginning" event is being raised,
  * prints in the console the pure damage unleashed from the attacking hero.
  */
 private static void GameEngine_AttackBeginning(object sender, AttackBeginningArgs e)
 {
     Console.WriteLine(e.Attacker.Nickname + " unleashed " + e.RawDamage + " points of pure damage.");
 }