internal void ReplaceActiveMenu()
 {
     activeMenu.transform.position = units[0].transform.position;
     if (units[0].tag.Equals("Player"))
     {
         activeMenu.SetActive(true);
     }
     else
     {
         int dmg = units[0].GetComponent <Unit>().Attack(1);
         activeMenu.SetActive(false);
         BattleAI.ChoiceTarget();
         //  print(units[0].name + " ударил " + target.name + " на " + dmg + "осталось ХП " + target.GetComponent<Unit>().hitPoint);
         Fight(dmg);
     }
 }
Beispiel #2
0
    internal void StartBattle()
    {
        units[0].GetComponent <Unit>().ActivateEffect(); //активация эффекта
        if (units[0].tag.Equals("Player"))
        {
            units[0].GetComponent <SelectUnit>().self.SetActive(true);
            activeMenu.GetComponent <ActiveMenu>().ReplaceActiveMenu(units);
        }
        else
        {
            //прописать AI

            // skill = units[0].GetComponent<Unit>().activeSkills[0];
            BattleAI.ChoiceSkill(units[0]);
            BattleAI.ChoiceTarget();
            Fight();
        }
    }