Пример #1
0
    public void OpenCharacterInfoPanel(BaseVillager villager)
    {
        villagerReference = villager;

        villagerReference.gameObject.GetComponent <Renderer>().material.SetFloat("_Outline", 0.2f);

        selectedCharacterInfo       = villagerReference.GetCharacterInfo();
        selectedCharacterTaskSkills = villagerReference.GetTaskSkills();

        for (int i = 0; i < infoText.Length; i++)
        {
            switch (i)
            {
            case 1:
                infoText [i].text = selectedCharacterInfo.characterName;
                break;

            case 2:
                infoText[i].text = selectedCharacterInfo.characterName;
                break;

            case 3:
                if (selectedCharacterInfo.characterSex == 1)
                {
                    infoText [i].text = "Male";
                }
                else
                {
                    infoText [i].text = "Female";
                }
                break;

            case 5:
                infoText [i].text = selectedCharacterInfo.characterLevel.ToString();
                break;

            case 8:
                infoText [i].text = selectedCharacterInfo.characterAttributes.fitness.ToString();
                break;

            case 10:
                infoText [i].text = selectedCharacterInfo.characterAttributes.nimbleness.ToString();
                break;

            case 12:
                infoText [i].text = selectedCharacterInfo.characterAttributes.curiosity.ToString();
                break;

            case 14:
                infoText [i].text = selectedCharacterInfo.characterAttributes.focus.ToString();
                break;

            case 16:
                infoText [i].text = selectedCharacterInfo.characterAttributes.charm.ToString();
                break;

            case 19:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.brawling.ToString();
                break;

            case 21:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.sword.ToString();
                break;

            case 23:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.longsword.ToString();
                break;

            case 25:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.axe.ToString();
                break;

            case 27:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.polearm.ToString();
                break;

            case 29:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.bow.ToString();
                break;

            case 31:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.dodge.ToString();
                break;

            case 33:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.armor.ToString();
                break;

            case 36:
                infoText [i].text = selectedCharacterTaskSkills.mining.ToString();
                break;

            case 38:
                infoText [i].text = selectedCharacterTaskSkills.woodcutting.ToString();
                break;

            case 40:
                infoText [i].text = selectedCharacterTaskSkills.blacksmithing.ToString();
                break;

            case 42:
                infoText [i].text = selectedCharacterTaskSkills.weaponCrafting.ToString();
                break;

            case 44:
                infoText [i].text = selectedCharacterTaskSkills.armorCrafting.ToString();
                break;

            case 46:
                infoText [i].text = selectedCharacterTaskSkills.tailoring.ToString();
                break;

            case 48:
                infoText [i].text = selectedCharacterTaskSkills.farming.ToString();
                break;

            case 50:
                infoText [i].text = selectedCharacterTaskSkills.construction.ToString();
                break;

            case 52:
                infoText [i].text = selectedCharacterTaskSkills.sailing.ToString();
                break;

            case 54:
                infoText [i].text = villagerReference.GetEquippedWeapon().GetItemName();
                break;

            case 56:
                infoText [i].text = villagerReference.GetOffHandWeapon().GetItemName();
                break;

            case 58:
                infoText [i].text = villagerReference.GetEquippedArmor().GetItemName();
                break;
            }
        }

        characterPanel.SetActive(true);
    }
Пример #2
0
    public void OpenCharacterInfoPanel()
    {
        selectedCharacterInfo       = villagerReference.GetCharacterInfo();
        selectedCharacterTaskSkills = villagerReference.GetTaskSkills();

        //villagerReference.gameObject.GetComponent<Renderer>().material.SetFloat("_Outline", 0.2f);

        for (int i = 0; i < infoText.Length; i++)
        {
            switch (i)
            {
            case 1:
                infoText[i].text = selectedCharacterInfo.characterName;
                break;

            case 2:
                characterPanel.GetComponentInChildren <InputField>().text = selectedCharacterInfo.characterName;
                break;

            case 4:
                if (selectedCharacterInfo.characterSex == 1)
                {
                    infoText [i].text = "Male";
                }
                else
                {
                    infoText [i].text = "Female";
                }
                break;

            case 6:
                infoText [i].text = selectedCharacterInfo.characterLevel.ToString();
                break;

            case 9:
                infoText [i].text = selectedCharacterInfo.characterAttributes.fitness.ToString();
                break;

            case 11:
                infoText [i].text = selectedCharacterInfo.characterAttributes.nimbleness.ToString();
                break;

            case 13:
                infoText [i].text = selectedCharacterInfo.characterAttributes.curiosity.ToString();
                break;

            case 15:
                infoText [i].text = selectedCharacterInfo.characterAttributes.focus.ToString();
                break;

            case 17:
                infoText [i].text = selectedCharacterInfo.characterAttributes.charm.ToString();
                break;

            case 20:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.brawling.ToString();
                break;

            case 22:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.sword.ToString();
                break;

            case 24:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.longsword.ToString();
                break;

            case 26:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.axe.ToString();
                break;

            case 28:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.polearm.ToString();
                break;

            case 30:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.bow.ToString();
                break;

            case 32:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.dodge.ToString();
                break;

            case 34:
                infoText [i].text = selectedCharacterInfo.characterCombatSkills.armor.ToString();
                break;

            case 37:
                infoText [i].text = selectedCharacterTaskSkills.mining.ToString();
                break;

            case 39:
                infoText [i].text = selectedCharacterTaskSkills.woodcutting.ToString();
                break;

            case 41:
                infoText [i].text = selectedCharacterTaskSkills.blacksmithing.ToString();
                break;

            case 43:
                infoText [i].text = selectedCharacterTaskSkills.weaponCrafting.ToString();
                break;

            case 45:
                infoText [i].text = selectedCharacterTaskSkills.armorCrafting.ToString();
                break;

            case 47:
                infoText [i].text = selectedCharacterTaskSkills.tailoring.ToString();
                break;

            case 49:
                infoText [i].text = selectedCharacterTaskSkills.farming.ToString();
                break;

            case 51:
                infoText [i].text = selectedCharacterTaskSkills.construction.ToString();
                break;

            case 53:
                infoText [i].text = selectedCharacterTaskSkills.sailing.ToString();
                break;

            case 55:
                infoText [i].text = villagerReference.GetEquippedWeapon().GetItemName();
                break;

            case 57:
                infoText [i].text = villagerReference.GetOffHandWeapon().GetItemName();
                break;

            case 59:
                infoText [i].text = villagerReference.GetEquippedArmor().GetItemName();
                break;
            }
        }

        characterPanel.SetActive(true);
    }