Exemplo n.º 1
0
 protected void SpellSlotActivated(int slotNumber) {
     if (selectedHero != null) {
         var spellSlot = selectedHero.GetSpellSlots()[slotNumber];
         if (!spellSlot.CheckCastPossibility())
             return;
         activeSpell = spellSlot;
         if (spellSlot.data.type == SpellTypes.TARGET) {
             OnPreparationTargetSignal.Dispatch();
         } else {
             OnPreparationAreaSignal.Dispatch((spellSlot.data as MeteorData).range);
         }
     }
 }
Exemplo n.º 2
0
        public void Initialize(HeroContext heroParam, HeroModel heroModelParam, SpellSlot slotParam, string icon) {
            slot = slotParam;
            Level = slot.level;
            Icon = icon;
            Parent = heroParam;
            heroModel = heroModelParam;

            slot.OnStartCooldown += OnStartCooldown;
            slot.OnEndCooldown += OnEndCooldown;
            if (slot.Cooldown != null) {
                IsOnCooldown = true;
                slot.Cooldown.OnTick += OnTick;
            } else {
                IsOnCooldown = false;
            }
        }
Exemplo n.º 3
0
 private void ResetActiveSpell() {
     activeSpell = null;
 }