public override void OnWhen()
        {
            base.OnWhen();

            var combatMember = new PlayerCombatMember(100, "Other Player");
            _event = new DamageEvent(combatMember, 10);
            _eventAggregator.Publish(_event);
        }
        /// <summary>
        /// Called when [damage].
        /// </summary>
        /// <param name="e">The e.</param>
        private void OnDamage(DamageEvent e)
        {
            if (e.CombatMember.Id != _playerCombatMember.Id)
                return;

            CurrentHealth -= e.Damage;
        }
Esempio n. 3
0
 private static void OnDamage(DamageEvent e)
 {
     Console.WriteLine("{0} takes {1} damage", e.CombatMember.Name, e.Damage);
 }