예제 #1
0
        private static void fighterDeathHandler(object sender, DeathEventArgs dea)
        {
            var fighter = (Fighter)sender;

            Console.WriteLine("{0} died", fighter.Name);
            hitAgain = false;
        }
예제 #2
0
 private void fighterDeathHandler(object sender, DeathEventArgs dea)
 {
     Console.WriteLine("Wife of {0} is lamenting his death", Fighter.Name);
     Fighter.Death -= fighterDeathHandler;
 }