Esempio n. 1
0
        public void SetupView(AvatarDataItem avatarData)
        {
            this._isRemoteAvatar = false;
            this._avatarData     = avatarData;
            this.SetupAvatarBasicStatus(base.transform.Find("BasicStatus/InfoPanel/BasicStatus"));
            base.transform.Find("BasicStatus/InfoPanel/StarPanel/AvatarStar").GetComponent <MonoAvatarStar>().SetupView(this._avatarData.star);
            base.transform.Find("Introduction").gameObject.SetActive(false);
            base.transform.Find("Star").gameObject.SetActive(true);
            this.SetupTiltSlider(base.transform.Find("Star/InfoRowFragment/Fragment"), (float)avatarData.fragment, (float)avatarData.MaxFragment);
            base.transform.Find("Star/StarUpBtn").GetComponent <Button>().interactable = avatarData.CanStarUp;
            base.transform.Find("Star/StarUpBtn/PopUp").gameObject.SetActive(avatarData.CanStarUp);
            MonoButtonWwiseEvent component = null;

            component = base.transform.Find("Star/StarUpBtn").GetComponent <MonoButtonWwiseEvent>();
            if (component == null)
            {
                component = base.transform.Find("Star/StarUpBtn").gameObject.AddComponent <MonoButtonWwiseEvent>();
            }
            component.eventName = !base.transform.Find("Star/StarUpBtn").GetComponent <Button>().interactable ? "UI_Gen_Select_Negative" : "UI_Click";
            base.transform.Find("Lv").gameObject.SetActive(true);
            this.SetupTiltSlider(base.transform.Find("Lv/InfoRowLv/Exp"), (float)avatarData.exp, (float)avatarData.MaxExp);
            PlayerDataItem playerData = Singleton <PlayerModule> .Instance.playerData;

            base.transform.Find("Lv/LvUpBtn").GetComponent <Button>().interactable = (this._avatarData.level < playerData.AvatarLevelLimit) || (this._avatarData.exp < this._avatarData.MaxExp);
            component = base.transform.Find("Lv/LvUpBtn").GetComponent <MonoButtonWwiseEvent>();
            if (component == null)
            {
                component = base.transform.Find("Lv/LvUpBtn").gameObject.AddComponent <MonoButtonWwiseEvent>();
            }
            component.eventName = !base.transform.Find("Lv/LvUpBtn").GetComponent <Button>().interactable ? "UI_Gen_Select_Negative" : "UI_Click";
        }
Esempio n. 2
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. 3
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";
        }
Esempio n. 4
0
        public void SetupView(ActivityDataItemBase activityData)
        {
            this._activityData = activityData;
            base.transform.Find("Icon/Image").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(this._activityData.GetActivityEnterImgPath());
            base.transform.Find("LeftTime").gameObject.SetActive(false);
            base.transform.Find("Icon/Status/Over").gameObject.SetActive(false);
            base.transform.Find("Icon/Status/Lock").gameObject.SetActive(false);
            base.transform.Find("Icon/Status/WaitToStart").gameObject.SetActive(false);
            string str = null;

            switch (this._activityData.GetStatus())
            {
            case ActivityDataItemBase.Status.Over:
                base.transform.Find("Icon/Status/Over").gameObject.SetActive(true);
                break;

            case ActivityDataItemBase.Status.Locked:
                base.transform.Find("Icon/Status/Lock").gameObject.SetActive(true);
                str = "UI_Gen_Select_Negative";
                break;

            case ActivityDataItemBase.Status.WaitToStart:
                base.transform.Find("Icon/Status/WaitToStart").gameObject.SetActive(true);
                base.transform.Find("LeftTime").gameObject.SetActive(true);
                break;

            case ActivityDataItemBase.Status.InProgress:
                base.transform.Find("LeftTime").gameObject.SetActive(!(activityData is EndlessActivityDataItem));
                break;
            }
            if (!string.IsNullOrEmpty(str))
            {
                MonoButtonWwiseEvent component = base.transform.Find("Button").GetComponent <MonoButtonWwiseEvent>();
                if (component == null)
                {
                    component = base.transform.Find("Button").gameObject.AddComponent <MonoButtonWwiseEvent>();
                }
                if (component != null)
                {
                    component.eventName = str;
                }
            }
        }
Esempio n. 5
0
        public void SetupView(ChapterDataItem chapterData)
        {
            this._chapterData = chapterData;
            base.transform.Find("Icon/Image").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(this._chapterData.CoverPic);
            base.transform.Find("Icon/Lock").gameObject.SetActive(!this._chapterData.Unlocked);
            GameObject gameObject = base.transform.Find("Button").gameObject;

            if (gameObject != null)
            {
                MonoButtonWwiseEvent component = gameObject.GetComponent <MonoButtonWwiseEvent>();
                if (component == null)
                {
                    component = gameObject.AddComponent <MonoButtonWwiseEvent>();
                }
                component.eventName = !this._chapterData.Unlocked ? "UI_Gen_Select_Negative" : "UI_Click";
            }
            this.InitChapterProgress();
            this.SetProgress();
        }