Exemplo n.º 1
0
    public void loadLvlUpSkills(List <string> mSkills, List <string> newSkills)
    {
        List <SkillMeta> Skills = new List <SkillMeta>(GameUtilities.parseSkills(newSkills.ToArray(), PanelManager.instance.glossaryObj.GetComponent <Glossary>()));

        for (int i = 0; i < 4; i++)
        {
            if (newSkills.Count > i)
            {
                GameObject.Find("LSk0" + (i + 1) + "C").GetComponent <Text>().text = mSkills.Contains(newSkills[i]) ? newSkills[i] : "<color=#0000ff>" + newSkills[i] + "</color>";
                GameObject.Find("LSk0" + (i + 1) + "D").GetComponent <Text>().text = PanelManager.getEffectsString(Skills[i].effects);
            }
            else
            {
                GameObject.Find("LSk0" + (i + 1) + "C").GetComponent <Text>().text = "";
                GameObject.Find("LSk0" + (i + 1) + "D").GetComponent <Text>().text = "";
            }
        }
        if (newSkills.Count > 4)
        {
            GameObject.Find("LSk05C").GetComponent <Text>().text = "<color=#0000ff>" + newSkills[4] + "</color>";
            GameObject.Find("LSk05D").GetComponent <Text>().text = PanelManager.getEffectsString(Skills[4].effects);
        }
        else
        {
            GameObject.Find("LSk05C").GetComponent <Text>().text = "";
            GameObject.Find("LSk05D").GetComponent <Text>().text = "";
        }
    }
Exemplo n.º 2
0
    void loadRosterInfo(int clk)
    {
        currentRosterMonster = clk - 1;

        if (rosterNickname == null)
        {
            rosterNickname = GameObject.Find("LNickName");
        }
        if (rosterEdit == null)
        {
            rosterEdit = GameObject.Find("NickNameEdit");
        }
        if (rosterInput == null)
        {
            rosterInput = GameObject.Find("LNickNameInput");
        }
        rosterInput.SetActive(false);

        AdventureMeta    playerMeta       = BaseSaver.getAdventure();
        PlayerRosterMeta monsterMetaShort = playerMeta.roster[currentRosterMonster];
        MonsterMeta      monsterMetaLong  = glossy.GetMonsterMain(monsterMetaShort.name).meta;

        int[] lvlInfo = MonsterMeta.CalcLvl(monsterMetaShort, monsterMetaLong.lvlSpeed);

        GameObject.Find("LImg").GetComponent <Image>().sprite = glossy.GetMonsterImage(monsterMetaShort.name);
        GameObject.Find("Llvl").GetComponent <Text>().text    = lvlInfo[0].ToString();
        GameObject.Find("LName").GetComponent <Text>().text   = monsterMetaShort.name;
        rosterNickname.GetComponent <Text>().text             = "\"" + monsterMetaShort.nickname + "\"";

        GameObject.Find("HealthTxt").GetComponent <Text>().text = "Health: " + monsterMetaShort.maxHealth.ToString();
        GameObject.Find("ExpTxt").GetComponent <Text>().text    = "Exp: " + monsterMetaShort.exp.ToString();
        GameObject.Find("Stat01Txt").GetComponent <Text>().text = "Lust: " + monsterMetaShort.lust.ToString("0.00");
        GameObject.Find("Stat02Txt").GetComponent <Text>().text = "Greed: " + monsterMetaShort.greed.ToString("0.00");
        GameObject.Find("Stat03Txt").GetComponent <Text>().text = "Wrath: " + monsterMetaShort.wrath.ToString("0.00");
        GameObject.Find("Stat04Txt").GetComponent <Text>().text = "Pride: " + monsterMetaShort.pride.ToString("0.00");
        GameObject.Find("Stat05Txt").GetComponent <Text>().text = "Gluttony: " + monsterMetaShort.gluttony.ToString("0.00");
        GameObject.Find("Stat06Txt").GetComponent <Text>().text = "Sloth: " + monsterMetaShort.sloth.ToString("0.00");
        GameObject.Find("Stat07Txt").GetComponent <Text>().text = "Envy: " + monsterMetaShort.envy.ToString("0.00");
        GameObject.Find("Stat08Txt").GetComponent <Text>().text = "Lrn: " + monsterMetaLong.lvlSpeed.ToString();

        List <string>    mSkills = new List <string>(monsterMetaShort.skills);
        List <SkillMeta> sMetas  = new List <SkillMeta>(GameUtilities.parseSkills(monsterMetaShort.skills, glossy));

        for (int i = 0; i < 2; i++)
        {
            if (monsterMetaLong.strengths.Length > i)
            {
                GameObject.Find("LType" + (i + 1).ToString() + "Txt").GetComponent <Text>().text = monsterMetaLong.strengths[i].ToString();
                //GameObject.Find("LType" + (i + 1).ToString()).GetComponent<Image>().enabled = true;
                //GameObject.Find("LType" + (i+1).ToString()).GetComponent<Image>().sprite = glossy.getGemSprite(MonsterMeta.elementToGem(monsterMetaLong.strengths[i]));
            }
            else
            {
                //GameObject.Find("LType" + (i + 1).ToString()).GetComponent<Image>().enabled = false;
                GameObject.Find("LType" + (i + 1).ToString() + "Txt").GetComponent <Text>().text = "";
            }
        }

        for (int i = 0; i < 4; i++)
        {
            if (mSkills.Count > i)
            {
                GameObject.Find("Sk0" + (i + 1) + "Res01Gem").GetComponent <Image>().enabled = true;
                GameObject.Find("Sk0" + (i + 1) + "Res02Gem").GetComponent <Image>().enabled = true;

                GameObject.Find("LSk0" + (i + 1) + "C").GetComponent <Text>().text     = mSkills[i];
                GameObject.Find("LSk0" + (i + 1) + "CDesc").GetComponent <Text>().text = PanelManager.getEffectsString(sMetas[i].effects);

                GameObject.Find("Sk0" + (i + 1) + "Res01Txt").GetComponent <Text>().text    = sMetas[i].req1.req.ToString();
                GameObject.Find("Sk0" + (i + 1) + "Res01Gem").GetComponent <Image>().sprite = glossy.getGemSprite(sMetas[i].req1.gem);
                GameObject.Find("Sk0" + (i + 1) + "Res02Txt").GetComponent <Text>().text    = sMetas[i].req2.req.ToString();
                GameObject.Find("Sk0" + (i + 1) + "Res02Gem").GetComponent <Image>().sprite = glossy.getGemSprite(sMetas[i].req2.gem);
            }
            else
            {
                GameObject.Find("LSk0" + (i + 1) + "C").GetComponent <Text>().text     = "";
                GameObject.Find("LSk0" + (i + 1) + "CDesc").GetComponent <Text>().text = "";

                GameObject.Find("Sk0" + (i + 1) + "Res01Txt").GetComponent <Text>().text     = "";
                GameObject.Find("Sk0" + (i + 1) + "Res02Txt").GetComponent <Text>().text     = "";
                GameObject.Find("Sk0" + (i + 1) + "Res01Gem").GetComponent <Image>().enabled = false;
                GameObject.Find("Sk0" + (i + 1) + "Res02Gem").GetComponent <Image>().enabled = false;
            }
        }
    }