Пример #1
0
 public static void Uninitialize()
 {
     Attacking -= OnAttacking;
     DamageDealt -= OnDamageDealt;
     Healing -= OnHealing;
     HealingDealt -= OnHealingDealt;
     MinionPlaced -= OnMinionPlaced;
     MinionPlayed -= OnMinionPlayed;
     SpellCasting -= OnSpellCasting;
     TurnEnd -= OnTurnEnd;
     TurnStart -= OnTurnStart;
 }
Пример #2
0
        public static void Initialize()
        {
            Attacking += OnAttacking;
            _minionAttackingListeners = new List<Tuple<BaseCard, AttackingEventHandler>>();

            DamageDealt += OnDamageDealt;
            _damageDealtListeners = new List<Tuple<BaseCard, DamageDealtEventHandler>>();

            Healing += OnHealing;
            _healingListeners = new List<Tuple<BaseCard, HealingEventHandler>>();

            HealingDealt += OnHealingDealt;
            _healingDealtListeners = new List<Tuple<BaseCard, HealingDealtEventHandler>>();

            MinionPlaced += OnMinionPlaced;
            _minionPlacedListeners = new List<Tuple<BaseCard, MinionPlacedEventHandler>>();

            MinionPlayed += OnMinionPlayed;
            _minionPlayedListeners = new List<Tuple<BaseCard, MinionPlayedEventHandler>>();

            SpellCasting += OnSpellCasting;
            _spellCastingListeners = new List<Tuple<BaseCard, SpellCastingEventHandler>>();

            TurnEnd += OnTurnEnd;
            _turnEndListeners = new List<Tuple<BaseCard, TurnEndEventHandler>>();

            TurnStart += OnTurnStart;
            _turnStartListeners = new List<Tuple<BaseCard, TurnStartEventHandler>>();
        }
Пример #3
0
 public static void RegisterForEvent(BaseCard self, TurnEndEventHandler callback)
 {
     _turnEndListeners.Add(new Tuple<BaseCard, TurnEndEventHandler>(self, callback));
 }
Пример #4
0
 public static void RegisterForEvent(BaseCard self, TurnEndEventHandler callback)
 {
     _turnEndListeners.Add(new Tuple <BaseCard, TurnEndEventHandler>(self, callback));
 }