Esempio n. 1
0
    public void LoadAllAvailableActives(List <string> learned, List <string> equiped)
    {
        ClearList();
        ids.Add("None");
        desc.Add("Remove active skill");

        if (learned != null)
        {
            foreach (string id in learned)
            {
                if (!equiped.Contains(id))
                {
                    ids.Add(id);
                    desc.Add(ActiveSkillManager.GetInstance().GetActive(id).info);
                }
            }
        }

        for (int i = 0; i < ids.Count; i++)
        {
            if (i < container.transform.childCount)
            {
                UpdateItem(ids[i], desc[i], i);
            }
            else
            {
                PopulateList(ids[i], desc[i]);
            }
        }
    }
 public BattleManager(BattleInterface listener)
 {
     this.listener = listener;
     calculate     = new BattleCalculator();
     activeManager = ActiveSkillManager.GetInstance();
     passiveSkill  = new PassiveManager();
     active        = new ActiveUse(this);
     enemyAI       = new EnemyAI(this);
     playerList    = new List <CharacterModel>();
     enemyList     = new List <CharacterModel>();
 }
 void SetActives(Text act, string activeName)
 {
     if (activeName == null || activeName.Length == 0)
     {
         act.text = "None";
         act.GetComponent <EquipedSkillUI>().SetDescription("No active skill");
     }
     else
     {
         act.text = ActiveSkillManager.GetInstance().GetActive(activeName).name;
         act.GetComponent <EquipedSkillUI>().SetDescription(ActiveSkillManager.GetInstance().GetActive(activeName).info);
     }
 }
Esempio n. 4
0
    void SetPlayerActiveSkills(CharacterModel player)
    {
        for (int x = 0; x < 5; x++)
        {
            activeBtns[x].gameObject.SetActive(false);
        }
        int i = 0;

        foreach (string active in player.actives)
        {
            if (active.Length > 0)
            {
                activeBtns[i].gameObject.SetActive(true);
                activeBtns[i].GetComponentInChildren <Text>().text = ActiveSkillManager.GetInstance().GetActive(active).name;
            }
            i++;
        }
    }
Esempio n. 5
0
 public void SetSkill(string id, string desc)
 {
     this.id   = id;
     this.desc = desc;
     GetComponent <Text>().text = ActiveSkillManager.GetInstance().GetName(id);
 }
Esempio n. 6
0
 public ActiveUse(BattleManager bManager)
 {
     bm            = bManager;
     activeManager = ActiveSkillManager.GetInstance();
     calculate     = new BattleCalculator();
 }
 void DialogUseSkillBook()
 {
     dialog.RequestConfirmationDialog("Teach this character " + ActiveSkillManager.GetInstance().GetName(ItemManager.GetItemFromPlayer(selectedItemIndex).value) + "?"
                                      , OnSkillBookUseYes, null, null);
 }