Пример #1
0
        public void SpellsChecker()
        {
            for (int i = 0; i < SpellParent.childCount; i++)
            {
                SpellLogic spell = SpellParent.GetChild(i).GetComponent <SpellLogic>();

                if (spell != null && spell.spellImage != null)
                {
                    if (spell.spellImage.EnergyCost > Energy || spell.spellImage.ManaCost > Mana)
                    {
                        spell.GetComponent <Image>().color         = new Color32(200, 200, 255, 240);
                        spell.GetComponent <Button>().interactable = false;
                    }
                    else
                    {
                        if (spell.spellInBattle.RestTurn == 0)
                        {
                            spell.GetComponent <Image>().color         = Color.white;
                            spell.GetComponent <Button>().interactable = true;
                        }
                        else
                        {
                            spell.GetComponent <Image>().color = new Color32(200, 200, 200, 240);
                        }
                    }
                }
            }
        }
Пример #2
0
 public void ReloadAllSpells()
 {
     for (int i = 0; i < SpellParent.childCount; i++)
     {
         SpellLogic spellLogic = SpellParent.GetChild(i).GetComponent <SpellLogic>();
         spellLogic.spellInBattle.Reloading();
     }
     if (BattleControll.battleControll.attackSpell.spellInBattle.Reloading())
     {
         BattleControll.battleControll.AttackSpellTurn(logic.CanUseSpecSpell());
     }
 }