Пример #1
0
        public void SetColorWhite()
        {
            Color color = MiscData.GetColor("TotalWhite");

            this.TrySetImageColorWithChildren(color);
            this.TrySetRawImageColorWithChildren(color);
        }
Пример #2
0
        public void SetupView(AvatarDataItem avatarDataItem, bool isSelected, EndlessAvatarHp avatarHP = null)
        {
            this._avatarData = avatarDataItem;
            this._avatarHp   = avatarHP;
            base.transform.Find("Panel").gameObject.SetActive(false);
            base.transform.Find("BG").GetComponent <Image>().sprite    = this.GetBGSprite();
            base.transform.Find("Frame").GetComponent <Image>().sprite = this.GetBorderSprite();
            base.transform.Find("Icon").GetComponent <Image>().sprite  = Miscs.GetSpriteByPrefab(this._avatarData.IconPath);
            base.transform.Find("PopUp").gameObject.SetActive(this._avatarData.CanStarUp);
            base.transform.Find("LockImg").gameObject.SetActive(!this._avatarData.UnLocked);
            List <int> memberList = Singleton <PlayerModule> .Instance.playerData.GetMemberList(1);

            bool flag  = (memberList.Count > 0) && memberList.Contains(this._avatarData.avatarID);
            bool flag2 = (memberList.Count > 0) && (this._avatarData.avatarID == memberList[0]);

            base.transform.Find("FlagImg").gameObject.SetActive(flag);
            base.transform.Find("FlagImg").GetComponent <Image>().color = !flag2?MiscData.GetColor("TotalWhite") : MiscData.GetColor("Yellow");

            base.transform.Find("AvatarStar").gameObject.SetActive(this._avatarData.UnLocked);
            if (this._avatarData.UnLocked)
            {
                this.SetAvatarStar();
            }
            base.transform.Find("LvText").GetComponent <Text>().text = !this._avatarData.UnLocked ? LocalizationGeneralLogic.GetText("Menu_AvatarLocked", new object[0]) : ("Lv." + this._avatarData.level);
            base.transform.Find("HPRemain").gameObject.SetActive(avatarHP != null);
            base.transform.Find("Icon").GetComponent <Image>().color = MiscData.GetColor("TotalWhite");
            base.transform.Find("FlashHint").gameObject.SetActive(false);
            base.transform.Find("LvText").gameObject.SetActive(true);
            this.SetUpAvatarDispatched(Singleton <IslandModule> .Instance.IsAvatarDispatched(this._avatarData.avatarID));
            if (avatarHP != null)
            {
                base.transform.Find("HPRemain").GetComponent <MonoRemainHP>().SetAvatarHPData(this._avatarHp, new Action <bool>(this.EndlessAvatarDieCallBack));
            }
            this.SetupSelectedView(isSelected);
        }
 private void SetStarColor(Transform starTrans)
 {
     if ((starTrans != null) && (starTrans.GetComponent<Image>() != null))
     {
         starTrans.GetComponent<Image>().color = MiscData.GetColor("TotalWhite");
     }
 }
Пример #4
0
        private void SetSettingEnable(Transform settingTrans, bool enable)
        {
            Transform transform  = settingTrans.FindChild("Choice/On");
            Transform transform2 = settingTrans.FindChild("Choice/Off");
            Transform transform3 = settingTrans.FindChild("Label");
            Transform transform4 = transform.FindChild("Text");
            Transform transform5 = transform2.FindChild("Text");

            if (!enable)
            {
                transform.FindChild("Blue").gameObject.SetActive(false);
                transform.FindChild("Grey").gameObject.SetActive(false);
                transform.FindChild("Disable").gameObject.SetActive(true);
                transform2.FindChild("Grey").gameObject.SetActive(false);
                transform2.FindChild("Disable").gameObject.SetActive(true);
                transform3.GetComponent <Text>().color = MiscData.GetColor("NotificationSettingDisableText");
                transform4.GetComponent <Text>().color = MiscData.GetColor("GraphicsSettingDisableText");
                transform5.GetComponent <Text>().color = MiscData.GetColor("GraphicsSettingDisableText");
            }
            else
            {
                transform.FindChild("Blue").gameObject.SetActive(true);
                transform.FindChild("Grey").gameObject.SetActive(true);
                transform2.FindChild("Grey").gameObject.SetActive(true);
                transform.FindChild("Disable").gameObject.SetActive(false);
                transform2.FindChild("Disable").gameObject.SetActive(false);
                transform3.GetComponent <Text>().color = Color.white;
                transform4.GetComponent <Text>().color = Color.white;
                transform5.GetComponent <Text>().color = Color.white;
            }
            transform.GetComponent <Button>().interactable  = enable;
            transform2.GetComponent <Button>().interactable = enable;
        }
Пример #5
0
        private void SetActiveTabBtn(bool active, Button btn)
        {
            btn.GetComponent <Image>().color = !active?MiscData.GetColor("Blue") : Color.white;

            btn.transform.Find("Text").GetComponent <Text>().color = !active ? Color.white : MiscData.GetColor("Black");
            btn.interactable = !active;
        }
Пример #6
0
        public void SetColorBlack()
        {
            Color color = MiscData.GetColor("TotalBlack");

            this.TrySetImageColorWithChildren(color);
            this.TrySetRawImageColorWithChildren(color);
        }
Пример #7
0
        public static ConfigAvatarShowInfo GetAvatarShowInfo(AvatarDataItem avatar, MiscData.PageInfoKey pageKey, string tabName)
        {
            ConfigTabAvatarTransformInfo info2;
            ConfigPageAvatarShowInfo     pageAvatarShowInfo = MiscData.GetPageAvatarShowInfo(pageKey);
            string avatarRegistryKey = avatar.AvatarRegistryKey;

            char[] separator = new char[] { '_' };
            string key       = avatarRegistryKey.Split(separator)[0];

            if (pageAvatarShowInfo.AvatarTabTransformInfos.ContainsKey(avatarRegistryKey))
            {
                info2 = pageAvatarShowInfo.AvatarTabTransformInfos[avatarRegistryKey];
            }
            else if (pageAvatarShowInfo.AvatarTabTransformInfos.ContainsKey(key))
            {
                info2 = pageAvatarShowInfo.AvatarTabTransformInfos[key];
            }
            else
            {
                info2 = pageAvatarShowInfo.AvatarTabTransformInfos["Default"];
            }
            string str3 = tabName + "_" + avatar.avatarID;

            if (info2.AvatarShowInfos.ContainsKey(str3))
            {
                return(info2.AvatarShowInfos[str3]);
            }
            if (info2.AvatarShowInfos.ContainsKey(tabName))
            {
                return(info2.AvatarShowInfos[tabName]);
            }
            return(info2.AvatarShowInfos["Default"]);
        }
Пример #8
0
        private void SetupSelectSkillSubSkillListView(Transform trans, AvatarSkillDataItem selectedSkillData)
        {
            trans.Find("ParentSkill/Icon/Image").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(selectedSkillData.IconPath);
            trans.Find("ParentSkill/Icon").GetComponent <Image>().color        = MiscData.GetColor("Blue");
            HashSet <int> set = new HashSet <int> {
                1, 2, 3
            };

            foreach (AvatarSubSkillDataItem item in selectedSkillData.avatarSubSkillList)
            {
                string    name      = "SubSkill_" + item.ShowOrder;
                Transform transform = trans.Find(name);
                if (transform != null)
                {
                    transform.gameObject.SetActive(true);
                    transform.GetComponent <MonoAvatarSubSkillIconButton>().SetupView(this._avatarData, selectedSkillData, item, this._isRemoteAvatar);
                    set.Remove(item.ShowOrder);
                }
            }
            foreach (int num in set)
            {
                string str2 = "SubSkill_" + num;
                trans.Find(str2).gameObject.SetActive(false);
            }
        }
Пример #9
0
        public void SetupViewWithIdentifyStatus(StigmataDataItem stigmata, bool forceLock)
        {
            this._stigmata = stigmata;
            Transform containerTrans = base.transform.Find("PrefContainer");
            Transform transform2     = base.transform.Find("Mask/PrefContainer");
            Transform transform3     = base.transform.Find("Mask");

            this.SetupPrefIntoContainer(containerTrans, stigmata);
            if (stigmata.IsAffixIdentify && !forceLock)
            {
                this.SetImageAttrForAllChildren(containerTrans, null, Color.white);
                containerTrans.gameObject.SetActive(true);
                transform3.gameObject.SetActive(false);
            }
            else
            {
                containerTrans.gameObject.SetActive(false);
                Material mat = Miscs.LoadResource <Material>("Material/ImageColorize", BundleType.RESOURCE_FILE);
                this.SetImageAttrForAllChildren(containerTrans, mat, Color.white);
                transform3.gameObject.SetActive(true);
                this.SetupPrefIntoContainer(transform2, stigmata);
                Material material2 = Miscs.LoadResource <Material>("Material/ImageMonoColor", BundleType.RESOURCE_FILE);
                this.SetImageAttrForAllChildren(transform2, material2, MiscData.GetColor("DarkBlue"));
            }
        }
Пример #10
0
        private void OnTabSetActive(bool active, GameObject go, Button btn)
        {
            btn.GetComponent <Image>().color = !active?MiscData.GetColor("Blue") : Color.white;

            btn.transform.Find("Text").GetComponent <Text>().color = !active ? Color.white : MiscData.GetColor("Black");
            btn.interactable = !active;
            go.SetActive(active);
        }
Пример #11
0
        private void EndlessAvatarDieCallBack(bool avatarDie)
        {
            base.transform.Find("Panel").gameObject.SetActive(avatarDie);
            base.transform.Find("Icon").GetComponent <Image>().color = !avatarDie?MiscData.GetColor("TotalWhite") : MiscData.GetColor("EndlessEnergyRunout");

            base.transform.Find("FlashHint").gameObject.SetActive(avatarDie);
            base.transform.Find("LvText").gameObject.SetActive(!avatarDie);
        }
Пример #12
0
        private void SetupManualRefreshInfo()
        {
            base.transform.Find("RefreshTab").gameObject.SetActive((this._shopType == UIShopType.SHOP_NORMAL) || (this._shopType == UIShopType.SHOP_ACTIVITY));
            if ((this._shopType != UIShopType.SHOP_GACHATICKET) && (this._shopType != UIShopType.SHOP_ENDLESS))
            {
                if (this._shopType == UIShopType.SHOP_ACTIVITY)
                {
                    base.transform.Find("RefreshTab").gameObject.SetActive(this._storeDataItem.isOpen);
                    if (!this._storeDataItem.isOpen)
                    {
                        return;
                    }
                }
                base.transform.Find("RefreshTab/RefreshTime/Num").GetComponent <Text>().text = (this._storeDataItem.maxManualRefreshTimes - this._storeDataItem.manualRefreshTimes).ToString();
                base.transform.Find("RefreshTab/MetalNum/Num").GetComponent <Text>().text    = this._storeDataItem.nextRefreshCost.ToString();
                base.transform.Find("RefreshTab/MetalNum/Num").GetComponent <Text>().color   = MiscData.GetColor("TotalWhite");
                base.transform.Find("RefreshTab/MetalNum/x").GetComponent <Text>().color     = MiscData.GetColor("TotalWhite");
                if (this._storeDataItem.refreshItemID == 0)
                {
                    base.transform.Find("RefreshTab/MetalNum/ImgMetal").GetComponent <Image>().sprite = UIUtil.GetResourceSprite(ResourceType.Hcoin, null);
                    if (Singleton <PlayerModule> .Instance.playerData.hcoin < this._storeDataItem.nextRefreshCost)
                    {
                        base.transform.Find("RefreshTab/MetalNum/Num").GetComponent <Text>().color = MiscData.GetColor("WarningRed");
                        base.transform.Find("RefreshTab/MetalNum/x").GetComponent <Text>().color   = MiscData.GetColor("WarningRed");
                    }
                }
                else
                {
                    string iconPath = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(this._storeDataItem.refreshItemID, 1).GetIconPath();

                    if (MiscData.GetCurrencyIconPath(this._storeDataItem.refreshItemID) != null)
                    {
                        iconPath = MiscData.GetCurrencyIconPath(this._storeDataItem.refreshItemID);
                    }
                    base.transform.Find("RefreshTab/MetalNum/ImgMetal").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(iconPath);
                    int number = 0;
                    StorageDataItemBase base3 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(this._storeDataItem.refreshItemID);

                    if (base3 != null)
                    {
                        number = base3.number;
                    }
                    if (number < this._storeDataItem.nextRefreshCost)
                    {
                        base.transform.Find("RefreshTab/MetalNum/Num").GetComponent <Text>().color = MiscData.GetColor("WarningRed");
                        base.transform.Find("RefreshTab/MetalNum/x").GetComponent <Text>().color   = MiscData.GetColor("WarningRed");
                    }
                }
                if (this._storeDataItem.manualRefreshTimes >= this._storeDataItem.maxManualRefreshTimes)
                {
                    base.transform.Find("RefreshTab/RefreshBtn").GetComponent <Button>().interactable = false;
                }
                else
                {
                    base.transform.Find("RefreshTab/RefreshBtn").GetComponent <Button>().interactable = true;
                }
            }
        }
Пример #13
0
        protected override bool SetupView()
        {
            base.view.transform.Find("Btn").gameObject.SetActive(false);
            this._animationManager = new SequenceAnimationManager(new Action(this.StartTimer), null);
            LevelScoreManager instance = Singleton <LevelScoreManager> .Instance;
            int level                = (instance == null) ? this._levelBefore_no_scoremanager : instance.playerLevelBefore;
            int teamLevel            = Singleton <PlayerModule> .Instance.playerData.teamLevel;
            PlayerLevelMetaData data = PlayerLevelMetaDataReader.TryGetPlayerLevelMetaDataByKey(level);

            SuperDebug.VeryImportantAssert(data != null, string.Format("Cannot get player level data for player level:{0}", level));
            if (data == null)
            {
                data = PlayerLevelMetaDataReader.TryGetPlayerLevelMetaDataByKey(1);
            }
            base.view.transform.Find("Dialog/Content/LevelInfo/LvBefore/Lv").GetComponent <Text>().text = level.ToString();
            base.view.transform.Find("Dialog/Content/LevelInfo/LvAfter/Lv").GetComponent <Text>().text  = teamLevel.ToString();
            int       maxStamina = Singleton <PlayerModule> .Instance.playerData.MaxStamina;
            int       stamina    = data.stamina;
            Transform transform  = base.view.transform.Find("Dialog/Content/MaxStamina");

            if (maxStamina > stamina)
            {
                transform.gameObject.SetActive(true);
                transform.Find("Num").GetComponent <Text>().text    = maxStamina.ToString();
                transform.Find("AddNum").GetComponent <Text>().text = "+" + ((maxStamina - stamina)).ToString();
            }
            else
            {
                transform.gameObject.SetActive(false);
            }
            int       avatarLevelLimit = Singleton <PlayerModule> .Instance.playerData.AvatarLevelLimit;
            int       num6             = data.avatarLevelLimit;
            Transform transform2       = base.view.transform.Find("Dialog/Content/MaxAvatarLevel");

            if (avatarLevelLimit > num6)
            {
                transform2.gameObject.SetActive(true);
                transform2.Find("Num").GetComponent <Text>().text    = avatarLevelLimit.ToString();
                transform2.Find("AddNum").GetComponent <Text>().text = "+" + ((avatarLevelLimit - num6)).ToString();
            }
            else
            {
                transform2.gameObject.SetActive(false);
            }
            RectTransform component   = base.view.transform.Find("Dialog").GetComponent <RectTransform>();
            List <string> newFeatures = MiscData.GetNewFeatures(level, teamLevel);

            for (int i = 0; i < newFeatures.Count; i++)
            {
                string     text = LocalizationGeneralLogic.GetText(newFeatures[i], new object[0]);
                GameObject obj2 = UnityEngine.Object.Instantiate <GameObject>(Miscs.LoadResource <GameObject>("UI/Menus/Widget/Map/NewFeature", BundleType.RESOURCE_FILE));
                obj2.transform.SetParent(component.Find("Content"), false);
                obj2.transform.Find("FeatureName").GetComponent <Text>().text = text;
            }
            this._animationManager.AddAllChildrenInTransform(base.view.transform.Find("Dialog/Content"));
            base.view.transform.Find("Dialog").GetComponent <MonoDialogHeightGrow>().PlayGrow(new Action(this.OnDialogBGGrowEnd));
            return(false);
        }
Пример #14
0
        public void SetupView(bool selected, bool asent)
        {
            Image component = base.transform.GetComponent <Image>();
            bool  flag      = selected;

            component.enabled = flag;
            component.color   = !flag ? Color.white : MiscData.GetColor("Yellow");
            base.transform.Find("Text").GetComponent <Text>().color = !flag ? Color.white : MiscData.GetColor("Black");
            base.transform.Find("Order").gameObject.SetActive(flag);
            base.transform.Find("Order/UpImg").gameObject.SetActive(asent);
            base.transform.Find("Order/DownImg").gameObject.SetActive(!asent);
        }
Пример #15
0
        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);
            }
        }
Пример #16
0
        private void OnTabSetActive(bool active, GameObject go, Button btn)
        {
            btn.GetComponent <Image>().color = !active?MiscData.GetColor("Blue") : Color.white;

            btn.transform.Find("Text").GetComponent <Text>().color   = !active ? Color.white : MiscData.GetColor("Black");
            btn.transform.Find("Image").GetComponent <Image>().color = !active ? Color.white : MiscData.GetColor("Black");
            btn.interactable = !active;
            if (!btn.enabled)
            {
                btn.GetComponent <Image>().color = Color.grey;
            }
            this.ClearInputFieldText();
        }
Пример #17
0
        public void SetupView(MailDataItem mailData, Action <MailDataItem> checkBtnCallBack, Action <MailDataItem> getBtnCallBack)
        {
            this._mailData         = mailData;
            this._checkBtnCallBack = checkBtnCallBack;
            this._getBtnCallBack   = getBtnCallBack;
            Image component = base.transform.Find("ItemIconButton/ItemIcon").GetComponent <Image>();
            Image image2    = base.transform.Find("ItemIconButton/ItemIcon/Icon").GetComponent <Image>();

            this.ResetIconImageSize();
            if (this._mailData.hasAttachment)
            {
                RewardUIData data = this._mailData.attachment.itemList[0];
                component.color = MiscData.GetColor("TotalWhite");
                if (data.rewardType == ResourceType.Item)
                {
                    image2.transform.GetComponent <MonoImageFitter>().enabled = true;
                    StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(data.itemID, 1);

                    component.sprite = Miscs.GetSpriteByPrefab(MiscData.Config.ItemRarityBGImgPath[dummyStorageDataItem.rarity]);
                }
                else
                {
                    component.sprite = Miscs.GetSpriteByPrefab(MiscData.Config.ItemRarityBGImgPath[0]);
                    image2.transform.GetComponent <MonoImageFitter>().enabled = false;
                }
                image2.sprite = data.GetIconSprite();
                base.transform.Find("ItemIconButton/Text").GetComponent <Text>().text = "\x00d7" + data.value;
            }
            else
            {
                image2.transform.GetComponent <MonoImageFitter>().enabled = true;
                if (Singleton <MailModule> .Instance.IsMailRead(this._mailData))
                {
                    component.color = MiscData.GetColor("MailUnreadGrey");
                    image2.sprite   = Miscs.GetSpriteByPrefab("SpriteOutput/Mail/IconMailOpen");
                    base.transform.Find("ItemIconButton/Text").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_Desc_MailReaded", new object[0]);
                }
                else
                {
                    component.color = MiscData.GetColor("Blue");
                    image2.sprite   = Miscs.GetSpriteByPrefab("SpriteOutput/Mail/IconMailUnread");
                    base.transform.Find("ItemIconButton/Text").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_Desc_MailUnRead", new object[0]);
                }
            }
            base.transform.Find("ItemIconButton/NewMark").gameObject.SetActive(Singleton <MailModule> .Instance.IsMailNew(this._mailData));
            base.transform.Find("Time/Time").GetComponent <Text>().text    = Miscs.GetBeforeTimeToShow(this._mailData.time);
            base.transform.Find("Info/Content").GetComponent <Text>().text = this.GetMailContentAbstract();
            base.transform.Find("Info/Sender").GetComponent <Text>().text  = this._mailData.sender;
            base.transform.Find("Title/Text").GetComponent <Text>().text   = this._mailData.title;
            base.transform.Find("ActionBtns/GetBtn").gameObject.SetActive(this._mailData.hasAttachment);
        }
Пример #18
0
        public void SetupView(AvatarDataItem avatarDataItem, AvatarSkillDataItem skillData, bool isRemoteAvatar)
        {
            this._avatarData     = avatarDataItem;
            this._skillData      = skillData;
            this._isRemoteAvatar = isRemoteAvatar;
            Text component = base.transform.Find("Info/NameText").GetComponent <Text>();

            component.text  = this._skillData.SkillName;
            component.color = !this._skillData.UnLocked ? MiscData.GetColor("TextGrey") : Color.white;
            Transform transform = base.transform.Find("SkillIcon/UnLockInfo");

            transform.gameObject.SetActive(!this._skillData.UnLocked);
            Transform transform2 = transform.Find("UnLockStar");
            Transform transform3 = transform.Find("UnLockLv");

            transform2.gameObject.SetActive(false);
            transform3.gameObject.SetActive(false);
            if (transform.gameObject.activeSelf)
            {
                base.transform.Find("SkillIcon/Icon").GetComponent <Image>().color = MiscData.GetColor("SkillBtnGrey");
                bool flag = this._avatarData.level < this._skillData.UnLockLv;
                if (this._avatarData.star < this._skillData.UnLockStar)
                {
                    transform2.gameObject.SetActive(true);
                    transform3.gameObject.SetActive(false);
                    transform2.Find("Star").GetComponent <MonoAvatarStar>().SetupView(this._skillData.UnLockStar);
                }
                else if (flag)
                {
                    transform2.gameObject.SetActive(false);
                    transform3.gameObject.SetActive(true);
                    transform3.Find("Lv").GetComponent <Text>().text = "Lv." + this._skillData.UnLockLv;
                }
            }
            int  levelSum    = this._skillData.GetLevelSum();
            int  maxLevelSum = this._skillData.GetMaxLevelSum();
            Text text2       = base.transform.Find("Info/Row/AddPtText").GetComponent <Text>();

            text2.gameObject.SetActive(this._skillData.UnLocked);
            if (levelSum == maxLevelSum)
            {
                text2.text = "MAX";
            }
            else
            {
                text2.text = (levelSum <= 0) ? string.Empty : ("+" + levelSum);
            }
            this.SetupIcon();
            this.SetupSkillPopUp();
        }
Пример #19
0
 public void SetupStatus(bool isSelect)
 {
     this._hideGameObject.SetActive(false);
     this._hideDotGameObject.SetActive(false);
     this.selected = isSelect;
     if (!isSelect)
     {
         this._selectedGameObject.SetActive(false);
         this._unselectedGameObject.SetActive(true);
         this._selectDotGameObject.SetActive(false);
         this._unselectDotGameObject.SetActive(true);
         this._imageImage.color = MiscData.GetColor("ActImageUnSelect");
         this._descTransform.SetLocalPositionX(-22f);
         this._descText.fontSize   = 0x18;
         this._descText.color      = MiscData.GetColor("ActDescGray");
         this._descOutline.enabled = false;
         this._needFade            = false;
     }
     else
     {
         this._selectedGameObject.SetActive(true);
         this._unselectedGameObject.SetActive(false);
         this._selectDotGameObject.SetActive(true);
         this._unselectDotGameObject.SetActive(false);
         this._imageImage.material = null;
         this._imageImage.color    = MiscData.GetColor("TotalWhite");
         this._descTransform.SetLocalPositionX(-42f);
         this._descText.fontSize   = 30;
         this._descText.color      = Color.white;
         this._descOutline.enabled = true;
         if (this._step != BGAniStep.FadeIn)
         {
             this._step       = BGAniStep.Prepare;
             this._bgAniTimer = 0f;
             this._needFade   = true;
         }
     }
     if ((this._actData == null) && (this._activityDatta != null))
     {
         if (this._activityDatta.GetStatus() == ActivityDataItemBase.Status.Unavailable)
         {
             this._imageImage.material = this._unselectMaterial;
             this._imageImage.color    = MiscData.GetColor("Blue");
         }
         if (isSelect)
         {
             this._infoPanel.SetupView(this._activityDatta);
         }
     }
 }
        private void PlayPowerUpEffect()
        {
            Transform transform;
            ParticleSystem[] systemArray;
            if (this.dialogType == DialogType.PowerUp)
            {
                this._powerUpResultIndex = MiscData.GetEquipPowerUpResultIndex(this.boostRate);
                switch (this._powerUpResultIndex)
                {
                    case 2:
                        Singleton<WwiseAudioManager>.Instance.Post("UI_Upgrade_PTL_Small", null, null, null);
                        transform = base.view.transform.Find("ItemPanel/Effects/UpgradingBigSuccess");
                        transform.gameObject.SetActive(true);
                        goto Label_011D;

                    case 3:
                        Singleton<WwiseAudioManager>.Instance.Post("UI_Upgrade_PTL_Large", null, null, null);
                        transform = base.view.transform.Find("ItemPanel/Effects/UpgradingLargeSuccess");
                        transform.gameObject.SetActive(true);
                        goto Label_011D;
                }
                Singleton<WwiseAudioManager>.Instance.Post("UI_Upgrade_PTL_Small", null, null, null);
                transform = base.view.transform.Find("ItemPanel/Effects/UpgradeSuccess");
                transform.gameObject.SetActive(true);
            }
            else
            {
                Singleton<WwiseAudioManager>.Instance.Post("UI_Upgrade_PTL_Large", null, null, null);
                transform = base.view.transform.Find("ItemPanel/Effects/Evolution");
                transform.gameObject.SetActive(true);
            }
            Label_011D:
            systemArray = transform.GetComponentsInChildren<ParticleSystem>();
            for (int i = 0; i < systemArray.Length; i++)
            {
                systemArray[i].Play();
            }
            if (this.dialogType == DialogType.PowerUp)
            {
                this.SetupLvInfoPanel(0f);
            }
            else if (this.dialogType == DialogType.Evo)
            {
                this.SetupTitleAndStar(0f, false);
            }
            else if (this.dialogType == DialogType.NewAffix)
            {
                this.SetupNewAffixInfo(0f);
            }
        }
Пример #21
0
        private void SetProcessPieces(Transform[] processPiecesGroups, int volume)
        {
            List <Transform> list = new List <Transform>();

            for (int i = 0; i < volume; i++)
            {
                IEnumerator enumerator = processPiecesGroups[i].GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        Transform current = (Transform)enumerator.Current;
                        list.Add(current);
                    }
                }
                finally
                {
                    IDisposable disposable = enumerator as IDisposable;
                    if (disposable == null)
                    {
                    }
                    disposable.Dispose();
                }
            }
            for (int j = 0; j < list.Count; j++)
            {
                Transform transform3 = list[j];
                transform3.GetComponent <Image>().color = Color.Lerp(MiscData.GetColor("AudioSettingPieceYellow"), MiscData.GetColor("Blue"), ((float)j) / ((float)list.Count));
            }
            for (int k = volume; k < processPiecesGroups.Length; k++)
            {
                IEnumerator enumerator2 = processPiecesGroups[k].GetEnumerator();
                try
                {
                    while (enumerator2.MoveNext())
                    {
                        Transform transform5 = (Transform)enumerator2.Current;
                        transform5.GetComponent <Image>().color = MiscData.GetColor("TextGrey");
                    }
                }
                finally
                {
                    IDisposable disposable2 = enumerator2 as IDisposable;
                    if (disposable2 == null)
                    {
                    }
                    disposable2.Dispose();
                }
            }
        }
Пример #22
0
        private void SetupSpeicalTab()
        {
            HcoinGachaData specialGachaData = this._displayInfo.specialGachaData;
            bool           flag             = (specialGachaData != null) && (TimeUtil.Now < Miscs.GetDateTimeFromTimeStamp(specialGachaData.get_data_expire_time()));

            base.view.transform.Find("SpecialTab").gameObject.SetActive(flag);
            base.view.transform.Find("TabBtns/TabBtn_2").gameObject.SetActive(flag);
            if (!flag)
            {
                if (this._currentTabKey == "SpecialTab")
                {
                    this._currentTabKey = "HcoinTab";
                }
            }
            else
            {
                StorageDataItemBase base2 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID((int)specialGachaData.get_ticket_material_id());

                StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem((int)specialGachaData.get_ticket_material_id(), 1);

                string gachaTicketIconPath = MiscData.GetGachaTicketIconPath((int)specialGachaData.get_ticket_material_id());
                Sprite spriteByPrefab      = !string.IsNullOrEmpty(gachaTicketIconPath) ? Miscs.GetSpriteByPrefab(gachaTicketIconPath) : null;
                if (spriteByPrefab == null)
                {
                    spriteByPrefab = Miscs.GetSpriteByPrefab(dummyStorageDataItem.GetIconPath());
                }
                base.view.transform.Find("SpecialTab/InfoPanel/Title/Time").GetComponent <Text>().text         = specialGachaData.get_common_data().get_title();
                base.view.transform.Find("SpecialTab/InfoPanel/Desc/Text").GetComponent <Text>().text          = UIUtil.ProcessStrWithNewLine(specialGachaData.get_common_data().get_content());
                base.view.transform.Find("SpecialTab/ActBtns/One/Btn/Text").GetComponent <Text>().text         = LocalizationGeneralLogic.GetText(MiscData.Config.GachaTimeTextID[1], new object[0]);
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Btn/Text").GetComponent <Text>().text         = LocalizationGeneralLogic.GetText(MiscData.Config.GachaTimeTextID[10], new object[0]);
                base.view.transform.Find("SpecialTab/ActBtns/One/Btn/Cost/Num").GetComponent <Text>().text     = "x" + 1;
                base.view.transform.Find("SpecialTab/ActBtns/One/Btn/Cost/Icon").GetComponent <Image>().sprite = spriteByPrefab;
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Btn/Cost/Num").GetComponent <Text>().text     = "x" + 10;
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Btn/Cost/Icon").GetComponent <Image>().sprite = spriteByPrefab;
                base.view.transform.Find("SpecialTab/ActBtns/One/Added/Note").GetComponent <Text>().text       = LocalizationGeneralLogic.GetText("Menu_SpecialGachaNote", new object[0]);
                base.view.transform.Find("SpecialTab/ActBtns/One/Added/Num").GetComponent <Text>().text        = "2";
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Added/Note").GetComponent <Text>().text       = LocalizationGeneralLogic.GetText("Menu_SpecialGachaNote", new object[0]);
                base.view.transform.Find("SpecialTab/ActBtns/Ten/Added/Num").GetComponent <Text>().text        = "20";
                base.view.transform.Find("SpecialTab/TicketRemain/Num").GetComponent <Text>().text             = (base2 != null) ? base2.number.ToString() : "0";
                base.view.transform.Find("SpecialTab/TicketRemain/Icon").GetComponent <Image>().sprite         = spriteByPrefab;
                UIUtil.TrySetupEventSprite(base.view.transform.Find("SpecialTab/SupplyImg/Pic").GetComponent <Image>(), specialGachaData.get_common_data().get_supply_image());
                UIUtil.TrySetupEventSprite(base.view.transform.Find("SpecialTab/InfoPanel/Title/Image").GetComponent <Image>(), specialGachaData.get_common_data().get_title_image());
                base.view.transform.Find("SpecialTab/RemainTime").gameObject.SetActive(specialGachaData.get_data_expire_timeSpecified());
                if (specialGachaData.get_data_expire_timeSpecified())
                {
                    base.view.transform.Find("SpecialTab/RemainTime/RemainTimer").GetComponent <MonoRemainTimer>().SetTargetTime(Miscs.GetDateTimeFromTimeStamp(specialGachaData.get_data_expire_time()), null, new Action(this.OnGachaDisplayDataExpired), false);
                }
                this._tabManager.SetTab("SpecialTab", base.view.transform.Find("TabBtns/TabBtn_2").GetComponent <Button>(), base.view.transform.Find("SpecialTab").gameObject);
            }
        }
Пример #23
0
        public void SetupView(string currentTabKey)
        {
            this._currentTabKey = currentTabKey;
            FriendModule.FriendSortType type = Singleton <FriendModule> .Instance.sortTypeMap[this._currentTabKey];
            Image component = base.transform.GetComponent <Image>();
            bool  flag      = (this.sortTypeAsc == type) || (this.sortTypeDesc == type);

            component.enabled = flag;
            component.color   = !flag ? Color.white : MiscData.GetColor("Yellow");
            base.transform.Find("Text").GetComponent <Text>().color = !flag ? Color.white : MiscData.GetColor("Black");
            base.transform.Find("Order").gameObject.SetActive(flag);
            base.transform.Find("Order/UpImg").gameObject.SetActive(this.sortTypeAsc == type);
            base.transform.Find("Order/DownImg").gameObject.SetActive(this.sortTypeDesc == type);
        }
Пример #24
0
        public static Color GetDifficultyColor(LevelDiffculty difficulty)
        {
            switch (difficulty)
            {
            case LevelDiffculty.Normal:
                return(MiscData.GetColor("ChapterDifficultyNormal"));

            case LevelDiffculty.Hard:
                return(MiscData.GetColor("ChapterDifficultyHard"));

            case LevelDiffculty.Hell:
                return(MiscData.GetColor("ChapterDifficultyHell"));
            }
            return(MiscData.GetColor("ChapterDifficultyNormal"));
        }
Пример #25
0
        public void UpdateView(bool isSelected)
        {
            this.selected = isSelected;
            base.transform.Find("Icon/Mask").gameObject.SetActive(!isSelected);
            base.transform.Find("Arrow").gameObject.SetActive(isSelected);
            base.transform.Find("Frame").GetComponent <Image>().color = !isSelected?MiscData.GetColor("Black") : MiscData.GetColor("Blue");

            base.transform.Find("Frame/Top").GetComponent <Image>().color = !isSelected?MiscData.GetColor("Black") : MiscData.GetColor("Blue");

            base.transform.Find("Frame/Bottom").GetComponent <Image>().color = !isSelected?MiscData.GetColor("Black") : MiscData.GetColor("Blue");

            base.transform.Find("Frame/Left").GetComponent <Image>().color = !isSelected?MiscData.GetColor("Black") : MiscData.GetColor("Blue");

            base.transform.Find("Frame/Right").GetComponent <Image>().color = !isSelected?MiscData.GetColor("Black") : MiscData.GetColor("Blue");
        }
Пример #26
0
        private void OnTabSetActive(bool active, GameObject go, Button btn)
        {
            btn.GetComponent <Image>().color = !active?MiscData.GetColor("Blue") : Color.white;

            btn.transform.Find("Text").GetComponent <Text>().color   = !active ? Color.white : MiscData.GetColor("Black");
            btn.transform.Find("Image").GetComponent <Image>().color = !active ? Color.white : MiscData.GetColor("Black");
            btn.interactable = !active;
            go.SetActive(active);
            if (active && this._fadeManagerDict.ContainsKey(go))
            {
                this._fadeManagerDict[go].Init(this._scrollerDict[go].GetItemDict(), this._itemBeforeDict[go], new Func <RectTransform, RectTransform, bool>(this.IsFriendDataEqual));
                this._fadeManagerDict[go].Play();
                this._itemBeforeDict[go] = null;
            }
        }
Пример #27
0
        private void SetRewardItemGrey(Transform rewardTrans)
        {
            rewardTrans.Find("BG/Unselected").GetComponent <Image>().color     = MiscData.GetColor("DropItemImageGrey");
            rewardTrans.Find("BG/Image").GetComponent <Image>().color          = MiscData.GetColor("DropItemImageGrey");
            rewardTrans.Find("ItemIcon/ItemIcon").GetComponent <Image>().color = MiscData.GetColor("DropItemIconGrey");
            Image component = rewardTrans.Find("ItemIcon/ItemIcon/Icon").GetComponent <Image>();

            if (component.material != component.defaultMaterial)
            {
                component.color = MiscData.GetColor("DropItemIconFullGrey");
            }
            else
            {
                component.color = MiscData.GetColor("DropItemIconGrey");
            }
        }
Пример #28
0
        protected override bool SetupView()
        {
            string str = MiscData.AddColor("Blue", LocalizationGeneralLogic.GetText("Menu_Scoin", new object[0])) + " + " + this._scoinNum;

            if (this._burstRate > 1f)
            {
                string   str2       = str;
                string[] textArray1 = new string[] { str2, " , ", MiscData.AddColor("Blue", LocalizationGeneralLogic.GetText("Menu_Desc_Critical", new object[0])), " \x00d7 ", string.Format("{0:0%}", this._burstRate) };
                str = string.Concat(textArray1);
            }
            base.view.transform.Find("Dialog/Content/TextScoin/line/Desc").GetComponent <Text>().text = str;
            base.view.transform.Find("Dialog/Content/MaterialList").gameObject.SetActive(this._materials.Count > 0);
            if (this._materials.Count >= 1)
            {
                if (this._materials.Count > this._max_materials_num)
                {
                }
                if (!Singleton <IslandModule> .Instance.IsDropMaterials() && (this._materials.Count > 0))
                {
                }
                for (int i = 0; i < this._max_materials_num; i++)
                {
                    int       num4      = i + 1;
                    Transform transform = base.view.transform.Find(string.Format("Dialog/Content/MaterialList/{0}", num4.ToString()));
                    if (i < this._materials.Count)
                    {
                        transform.gameObject.SetActive(true);
                        int metaId = (int)this._materials[i].get_item_id();
                        int level  = (int)this._materials[i].get_level();
                        StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(metaId, level);

                        if (dummyStorageDataItem != null)
                        {
                            transform.Find("ItemIcon/Icon").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(dummyStorageDataItem.GetIconPath());
                            transform.Find("Star").GetComponent <MonoItemIconStar>().SetupView(dummyStorageDataItem.rarity, dummyStorageDataItem.rarity);
                            transform.Find("Text").GetComponent <Text>().text = string.Format("x{0}", this._materials[i].get_num());
                        }
                    }
                    else
                    {
                        transform.gameObject.SetActive(false);
                    }
                }
            }
            return(false);
        }
Пример #29
0
        public static void Create3DAvatarByPage(AvatarDataItem avatar, MiscData.PageInfoKey pageKey, string tabName = "Default")
        {
            ConfigPageAvatarShowInfo     pageAvatarShowInfo = MiscData.GetPageAvatarShowInfo(pageKey);
            ConfigAvatarShowInfo         info2 = GetAvatarShowInfo(avatar, pageKey, tabName);
            List <Avatar3dModelDataItem> body  = new List <Avatar3dModelDataItem> {
                new Avatar3dModelDataItem(avatar, info2.Avatar.Position, info2.Avatar.EulerAngle, pageAvatarShowInfo.ShowLockViewIfLock)
            };

            Singleton <NotifyManager> .Instance.FireNotify(new Notify(NotifyTypes.CreateAvatarUIModels, body));

            GameObject obj2 = GameObject.Find("LookAt");

            if (obj2 != null)
            {
                obj2.transform.position    = info2.LookAt.Position;
                obj2.transform.eulerAngles = info2.LookAt.EulerAngle;
            }
        }
Пример #30
0
        private void UpdateDataView()
        {
            float num;
            float num2;

            UIUtil.CalCulateExpFromItems(out num, out num2, this._selectedItemList, this._powerUpTarget);
            bool flag      = UIUtil.CalculateLvWithExp(num2, this._powerUpTarget) >= this._powerUpTarget.GetMaxLevel();
            Text component = base.transform.Find("Content/Exp/Num/Num").GetComponent <Text>();

            component.text  = Mathf.RoundToInt(num2).ToString();
            component.color = !flag?MiscData.GetColor("TotalWhite") : MiscData.GetColor("WarningRed");

            base.transform.Find("Content/Exp/Num/MaxLabel").gameObject.SetActive(flag);
            bool flag2 = num > Singleton <PlayerModule> .Instance.playerData.scoin;
            Text text2 = base.transform.Find("Content/Scoin/Num").GetComponent <Text>();

            text2.text  = Mathf.RoundToInt(num).ToString();
            text2.color = !flag2?MiscData.GetColor("TotalWhite") : MiscData.GetColor("WarningRed");
        }