Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (associatedAdventurer != null && !associatedAdventurer.isPromoted)
     {
         if (cachedName != associatedAdventurer.fullName)
         {
             cachedName        = associatedAdventurer.fullName;
             inquiryLabel.text = strings[0] + cachedName + strings[1];
         }
         if (cachedClass != associatedAdventurer.baseClass)
         {
             cachedClass = associatedAdventurer.baseClass;
             AdventurerClass advC;
             if (cachedClass == AdventurerClass.Warrior)
             {
                 advC = AdventurerClass.Mystic;
             }
             else
             {
                 advC = AdventurerClass.Warrior;
             }
             reclassButtonLabel.text = strings[2] + Adventurer.GetClassName(advC);
         }
     }
 }
Пример #2
0
    void PopulateDropdownForWarrior()
    {
        dd.ClearOptions();
        List <Dropdown.OptionData> ddOpts = new List <Dropdown.OptionData>();
        List <WarriorPromotes>     l      = new List <WarriorPromotes>();

        for (int i = 1; i > 1 << 31;)  // whoops, bit shifting a signed int will do that, lol
        {
            if (GameDataManager.Instance.WarriorPromoteUnlocked((WarriorPromotes)i))
            {
                l.Add((WarriorPromotes)i);
            }
            i = i << 1;
        }
        for (int i = 0; i < l.Count; i++)
        {
            if (i >= ddOpts.Count)
            {
                advClasses.Add(AdventurerClass.None);
            }
            advClasses[i] = Adventurer._warriorPromoteToAdvClass(l[i]);
            ddOpts.Add(new Dropdown.OptionData(Adventurer.GetClassName(advClasses[i])));
        }
        dd.AddOptions(ddOpts);
    }
Пример #3
0
    void PopulateDropdownForMystic()
    {
        dd.ClearOptions();
        List <Dropdown.OptionData> ddOpts = new List <Dropdown.OptionData>();
        List <MysticPromotes>      l      = new List <MysticPromotes>();

        for (int i = 1; i > 1 << 31;)
        {
            if (GameDataManager.Instance.MysticPromoteUnlocked((MysticPromotes)i))
            {
                l.Add((MysticPromotes)i);
            }
            i = i << 1;
        }
        for (int i = 0; i < l.Count; i++)
        {
            if (i >= ddOpts.Count)
            {
                advClasses.Add(AdventurerClass.None);
            }
            advClasses[i] = Adventurer._mysticPromoteToAdvClass(l[i]);
            ddOpts.Add(new Dropdown.OptionData(Adventurer.GetClassName(advClasses[i])));
        }
        dd.AddOptions(ddOpts);
    }
Пример #4
0
 void _processTranslatedBookPanel(LibraryPopup_BookPanel bp, AdventurerClass advClass)
 {
     bp.button.gameObject.SetActive(false);
     bp.nameLabel.text  = Adventurer.GetClassName(advClass) + strings[1];
     bp.classDesc.text  = _bookFlavorTextForClass(advClass);
     bp.icon.sprite     = translatedIcon;
     bp.gameObject.name = "translated panel - " + bp.nameLabel.text;
 }
Пример #5
0
    void SetClassSelection(AdventurerClass _newClass)
    {
        setClass = _newClass;
        string className = Adventurer.GetClassName(setClass);
        string st2;

        if (Util.isVowel(className[0]))
        {
            st2 = strings[2];
        }
        else
        {
            st2 = strings[1];
        }
        promoteText.text = strings[0] + adv.fullName + st2 + className;
    }