Exemplo n.º 1
0
 static void ArenaAttackMade(object sender, AttackEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.White;
     switch (e.AttackResult) {
         case AttackResultType.Hit:
             Console.ForegroundColor = ConsoleColor.Green;
             Console.WriteLine("You hit for {0} damage", e.Damage);
             break;
         case AttackResultType.CriticalHit:
             Console.ForegroundColor = ConsoleColor.DarkGreen;
             Console.WriteLine("You critically hit for {0} damage", e.Damage);
             break;
         case AttackResultType.Miss:
             Console.ForegroundColor = ConsoleColor.White;
             Console.WriteLine("You miss...");
             break;
         default:
             break;
     }
     Console.ResetColor();
 }
Exemplo n.º 2
0
 static void ArenaAttacked(object sender, AttackEventArgs e)
 {
     Console.ForegroundColor = ConsoleColor.White;
     switch (e.AttackResult) {
         case AttackResultType.Hit:
             Console.ForegroundColor = ConsoleColor.Red;
             Console.WriteLine("{0} hits you for {1} damage", e.CharacterName, e.Damage);
             break;
         case AttackResultType.CriticalHit:
             Console.ForegroundColor = ConsoleColor.DarkRed;
             Console.WriteLine("{0} critically hits you for {1} damage", e.CharacterName, e.Damage);
             break;
         case AttackResultType.Miss:
             Console.ForegroundColor = ConsoleColor.White;
             Console.WriteLine("{0} misses you", e.CharacterName);
             break;
         default:
             break;
     }
     Console.ResetColor();
 }
Exemplo n.º 3
0
 private void OnAttackMade(AttackEventArgs e)
 {
     if (AttackMade != null) {
         AttackMade(this, e);
     }
 }
Exemplo n.º 4
0
 private void OnAttacked(AttackEventArgs e)
 {
     if (Attacked != null) {
         Attacked(this, e);
     }
 }