Esempio n. 1
0
        private void SetupView()
        {
            this._difficultyList.Sort(new Comparison <LevelDiffculty>(this.LevelDifficultySort));
            this.SetupDifficultyView(base.transform.Find("Current"), this._currentDifficulty);
            bool      flag      = UnlockUIDataReaderExtend.UnLockByMission(3) && UnlockUIDataReaderExtend.UnlockByTutorial(3);
            bool      flag2     = UnlockUIDataReaderExtend.UnLockByMission(4) && UnlockUIDataReaderExtend.UnlockByTutorial(4);
            Transform transform = base.transform.Find("Current/Arrow");

            if (this._difficultyList.Count > 2)
            {
                transform.gameObject.SetActive(flag || flag2);
            }
            else if (this._difficultyList.Count > 1)
            {
                transform.gameObject.SetActive(flag);
            }
            else
            {
                transform.gameObject.SetActive(false);
            }
            if (this._difficultyList.Count > 1)
            {
                Transform transform2 = base.transform.Find("PopUp");
                for (int i = 1; i < this._difficultyList.Count; i++)
                {
                    LevelDiffculty difficulty = this._difficultyList[i];
                    Transform      child      = transform2.GetChild(i - 1);
                    this.SetupDifficultyView(child, difficulty);
                    child.GetComponent <MonoLevelDifficultyButton>().SetupDifficulty(difficulty);
                }
            }
        }
Esempio n. 2
0
 public void OnCurrentDifficultyClick()
 {
     if (this._difficultyList.Count < 2)
     {
         base.transform.Find("PopUp").gameObject.SetActive(false);
         base.transform.Find("Btn").gameObject.SetActive(false);
     }
     else
     {
         this._popUpActive = !this._popUpActive;
         bool flag  = UnlockUIDataReaderExtend.UnLockByMission(3) && UnlockUIDataReaderExtend.UnlockByTutorial(3);
         bool flag2 = UnlockUIDataReaderExtend.UnLockByMission(4) && UnlockUIDataReaderExtend.UnlockByTutorial(4);
         if (this._difficultyList.Count > 2)
         {
             bool flag3 = this._popUpActive && (flag || flag2);
             base.transform.Find("PopUp").gameObject.SetActive(flag3);
             base.transform.Find("Btn").gameObject.SetActive(flag3);
             bool flag4 = flag3 && flag;
             bool flag5 = flag3 && flag2;
             if (((LevelDiffculty)this._difficultyList[0]) == LevelDiffculty.Normal)
             {
                 base.transform.Find("PopUp/difficulty_1").gameObject.SetActive(flag4);
                 base.transform.Find("PopUp/difficulty_2").gameObject.SetActive(flag5);
             }
             else if (((LevelDiffculty)this._difficultyList[0]) == LevelDiffculty.Hard)
             {
                 base.transform.Find("PopUp/difficulty_1").gameObject.SetActive(this._popUpActive);
                 base.transform.Find("PopUp/difficulty_2").gameObject.SetActive(flag5);
             }
             else
             {
                 base.transform.Find("PopUp/difficulty_1").gameObject.SetActive(this._popUpActive);
                 base.transform.Find("PopUp/difficulty_2").gameObject.SetActive(flag4);
             }
         }
         else
         {
             bool flag6 = this._popUpActive && flag;
             base.transform.Find("PopUp").gameObject.SetActive(flag6);
             base.transform.Find("Btn").gameObject.SetActive(flag6);
             if (((LevelDiffculty)this._difficultyList[0]) == LevelDiffculty.Normal)
             {
                 base.transform.Find("PopUp/difficulty_1").gameObject.SetActive(flag6);
                 base.transform.Find("PopUp/difficulty_2").gameObject.SetActive(false);
             }
             else
             {
                 base.transform.Find("PopUp/difficulty_1").gameObject.SetActive(this._popUpActive);
                 base.transform.Find("PopUp/difficulty_2").gameObject.SetActive(false);
             }
         }
     }
 }
Esempio n. 3
0
        private void CheckLockByMissionTutorial()
        {
            bool flag = UnlockUIDataReaderExtend.UnLockByMission(2) && UnlockUIDataReaderExtend.UnlockByTutorial(2);

            base.view.transform.Find("TabBtns/SkillTabBtn").GetComponent <Button>().interactable = flag;
            base.view.transform.Find("TabBtns/SkillTabBtn/PopUp").gameObject.SetActive(this._skillPopUpVisible && flag);
            base.view.transform.Find("TabBtns/SkillTabBtn/Lock").gameObject.SetActive(!flag);
            MonoButtonWwiseEvent component = base.view.transform.Find("TabBtns/SkillTabBtn").GetComponent <MonoButtonWwiseEvent>();

            if (component == null)
            {
                component = base.view.transform.Find("TabBtns/SkillTabBtn").gameObject.AddComponent <MonoButtonWwiseEvent>();
            }
            component.eventName = !flag ? "UI_Gen_Select_Negative" : "UI_Click";
        }
Esempio n. 4
0
        private void CheckLockByMissionTutorial()
        {
            bool flag = UnlockUIDataReaderExtend.UnLockByMission(1) && UnlockUIDataReaderExtend.UnlockByTutorial(1);

            base.view.transform.Find("Info/Unlock/Right/Skill").GetComponent <Button>().interactable = flag;
            base.view.transform.Find("Info/Unlock/Right/Skill/Lock").gameObject.SetActive(!flag);
            base.view.transform.Find("Info/Unlock/Right/Skill/SkillPoint/PointNum").gameObject.SetActive(flag);
            base.view.transform.Find("Info/Unlock/Right/Skill/SkillPoint/SkillPtLabel").gameObject.SetActive(flag);
            MonoButtonWwiseEvent component = base.view.transform.Find("Info/Unlock/Right/Skill").GetComponent <MonoButtonWwiseEvent>();

            if (component == null)
            {
                component = base.view.transform.Find("Info/Unlock/Right/Skill").gameObject.AddComponent <MonoButtonWwiseEvent>();
            }
            component.eventName = !flag ? "UI_Gen_Select_Negative" : "UI_Click";
        }
        private void SetupStigmata()
        {
            StigmataDataItem storageItem = this.storageItem as StigmataDataItem;

            base.view.transform.Find("Info/Content/Equipment/Title/TypeIcon").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(storageItem.GetSmallIconPath());
            string displayTitle = this.storageItem.GetDisplayTitle();

            if (storageItem.IsAffixIdentify)
            {
                string affixName = storageItem.GetAffixName();
                if (!string.IsNullOrEmpty(affixName))
                {
                    displayTitle = MiscData.AddColor("Blue", affixName) + " " + displayTitle;
                }
            }
            else
            {
                displayTitle = MiscData.AddColor("WarningRed", storageItem.GetAffixName()) + " " + displayTitle;
            }
            base.view.transform.Find("Info/Content/Equipment/Title/Name").GetComponent <Text>().text = displayTitle;
            base.view.transform.Find("Info/Content/Equipment/Cost/Num").GetComponent <Text>().text   = this.storageItem.GetCost().ToString();
            this.SetupItemProtectedStatus();
            base.view.transform.Find("Info/Content/Equipment/Star/EquipStar").GetComponent <MonoEquipSubStar>().SetupView(this.storageItem.rarity, this.storageItem.GetMaxRarity());
            base.view.transform.Find("Info/Content/Equipment/Star/EquipSubStar").GetComponent <MonoEquipSubStar>().SetupView(this.storageItem.GetSubRarity(), this.storageItem.GetMaxSubRarity() - 1);
            base.view.transform.Find("Info/Figure").GetComponent <MonoStigmataFigure>().SetupViewWithIdentifyStatus(storageItem, this.hideActionBtns && !this.unlock);
            if (storageItem.IsAffixIdentify)
            {
                bool flag = (storageItem.CanRefine && (Singleton <TutorialModule> .Instance != null)) && UnlockUIDataReaderExtend.UnlockByTutorial(5);
                base.view.transform.Find("ActionBtns/NewAffixBtn").GetComponent <Button>().interactable = flag;
                bool flag2 = Singleton <StorageModule> .Instance.GetStigmatasCanUseForNewAffix(storageItem).Count > 0;

                base.view.transform.Find("ActionBtns/NewAffixBtn/PopUp").gameObject.SetActive(flag2 && flag);
            }
            else
            {
                base.view.transform.Find("ActionBtns/PowerUpBtn").GetComponent <Button>().interactable  = false;
                base.view.transform.Find("ActionBtns/RarityUpBtn").GetComponent <Button>().interactable = false;
                base.view.transform.Find("ActionBtns/NewAffixBtn").GetComponent <Button>().interactable = false;
                base.view.transform.Find("ActionBtns/NewAffixBtn/PopUp").gameObject.SetActive(false);
            }
            base.view.transform.Find("Info/Figure/InfoMark").gameObject.SetActive(storageItem.IsAffixIdentify && this.unlock);
            base.view.transform.Find("Info/IdentifyBtn").gameObject.SetActive((!this.hideActionBtns || this.showIdentifyBtnOnly) && !storageItem.IsAffixIdentify);
            base.view.transform.Find("Info/IdentifyBtn").GetComponent <DragObject>().Init(this.storageItem);
            base.view.transform.Find("Info/Content/Equipment/Desc").GetComponent <Text>().text = this.storageItem.GetDescription();
            base.view.transform.Find("Info/Content").gameObject.SetActive(true);
            AvatarDataItem item2 = Singleton <AvatarModule> .Instance.TryGetAvatarByID(this.storageItem.avatarID);

            base.view.transform.Find("Info/Content/BtnInEquip").gameObject.SetActive(item2 != null);
            if (item2 != null)
            {
                base.view.transform.Find("Info/Content/BtnInEquip/EquipChara").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(item2.IconPath);
            }
        }