private void SetupGachaTicketStoreTab() { this._currentShopType = UIShopType.SHOP_GACHATICKET; GameObject gameObject = base.view.transform.Find("ShopTab").gameObject; List <Goods> goodsList = new List <Goods>(); foreach (int num in Singleton <PlayerModule> .Instance.playerData.gachaTicketPriceDict.Keys) { Goods item = new Goods(); item.set_goods_id((uint)num); goodsList.Add(item); } StoreDataItem storeDataItem = new StoreDataItem(true, "Menu_Label_GachaTicket", "Menu_Label_GachaTicket", goodsList); gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1").GetComponent <Button>().interactable = true; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_2").GetComponent <Button>().interactable = true; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket").GetComponent <Button>().interactable = false; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_Activity").GetComponent <Button>().interactable = true; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1/Text").GetComponent <Text>().color = Color.white; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_2/Text").GetComponent <Text>().color = Color.white; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket/Text").GetComponent <Text>().color = MiscData.GetColor("Black"); gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_Activity/Text").GetComponent <Text>().color = Color.white; if (storeDataItem != null) { base.view.transform.Find("ShopTab").GetComponent <MonoShopStoreTab>().SetupView(UIShopType.SHOP_GACHATICKET, storeDataItem, gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket/Text").GetComponent <Text>(), true, true); } }
private void SetupNormalStoreTab() { this._currentShopType = UIShopType.SHOP_NORMAL; GameObject gameObject = base.view.transform.Find("ShopTab").gameObject; StoreDataItem storeDataByType = Singleton <StoreModule> .Instance.GetStoreDataByType(UIShopType.SHOP_NORMAL); gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1").GetComponent <Button>().interactable = false; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_2").GetComponent <Button>().interactable = true; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket").GetComponent <Button>().interactable = true; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_Activity").GetComponent <Button>().interactable = true; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1/Text").GetComponent <Text>().color = MiscData.GetColor("Black"); gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_2/Text").GetComponent <Text>().color = Color.white; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket/Text").GetComponent <Text>().color = Color.white; gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_Activity/Text").GetComponent <Text>().color = Color.white; if (storeDataByType != null) { base.view.transform.Find("ShopTab").GetComponent <MonoShopStoreTab>().SetupView(UIShopType.SHOP_NORMAL, storeDataByType, gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1/Text").GetComponent <Text>(), true, true); } }
private void SetupReviveInfo() { Transform transform = base.view.transform.Find("Dialog/Content/ReviveConsumePanel"); int reviveCost = this._levelScoreManager.GetReviveCost(); if (reviveCost > Singleton <PlayerModule> .Instance.playerData.hcoin) { transform.Find("InfoAvatar").Find("HcoinNum").GetComponent <Text>().color = MiscData.GetColor("WarningRed"); transform.Find("InfoAvatar").Find("HcoinLabel").GetComponent <Text>().color = MiscData.GetColor("WarningRed"); base.view.transform.Find("Dialog/Content/ActionBtns/OK/IconRecharge").gameObject.SetActive(true); base.view.transform.Find("Dialog/Content/ActionBtns/OK/IconOK").gameObject.SetActive(false); base.view.transform.Find("Dialog/Content/ActionBtns/OK/Text").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_Tab_Recharge", new object[0]); } else { transform.Find("InfoAvatar").Find("HcoinNum").GetComponent <Text>().color = MiscData.GetColor("Blue"); transform.Find("InfoAvatar").Find("HcoinLabel").GetComponent <Text>().color = MiscData.GetColor("Blue"); base.view.transform.Find("Dialog/Content/ActionBtns/OK/IconRecharge").gameObject.SetActive(false); base.view.transform.Find("Dialog/Content/ActionBtns/OK/IconOK").gameObject.SetActive(true); base.view.transform.Find("Dialog/Content/ActionBtns/OK/Text").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_OK", new object[0]); } transform.Find("InfoAvatar").Find("HcoinNum").GetComponent <Text>().text = reviveCost.ToString(); transform.Find("InfoAvatar").Find("AvatarFullName").GetComponent <Text>().text = Singleton <EventManager> .Instance.GetActor <AvatarActor>(this.avatarRuntimeID).avatarDataItem.FullName; Transform transform2 = transform.Find("Consume"); transform2.Find("ReviveTimes").gameObject.SetActive(this._levelScoreManager.maxReviveNum != 0xffff); transform2.Find("ReviveTimes/AvaiableTimes").GetComponent <Text>().text = this._levelScoreManager.avaiableReviveNum.ToString(); transform2.Find("ReviveTimes/MaxTimes").GetComponent <Text>().text = this._levelScoreManager.maxReviveNum.ToString(); transform2.Find("Hcoin/Num").GetComponent <Text>().text = Singleton <PlayerModule> .Instance.playerData.hcoin.ToString(); base.view.transform.Find("Dialog/Content/ActionBtns/OK").GetComponent <Button>().interactable = this._levelScoreManager.avaiableReviveNum > 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; } }
public string GetSkillDisplay(int equipLevel = 1) { return(LocalizationGeneralLogic.GetTextWithParamArray <float>(this._metaData.skillDisplay, MiscData.GetColor("Blue"), this.GetSkillParamArray(equipLevel))); }
public void SetupView(StorageDataItemBase item, SelectMode selectMode = 0, bool isSelected = false, bool bShowCostOver = false, bool bUsed = false) { this._item = item; this.selectMode = selectMode; this._isSelected = isSelected; base.transform.Find("SelectedMark").gameObject.SetActive(false); base.transform.Find("ProtectedMark").gameObject.SetActive(false); base.transform.Find("InteractiveMask").gameObject.SetActive(false); base.transform.Find("NotEnough").gameObject.SetActive(false); base.transform.Find("Star").gameObject.SetActive(false); base.transform.Find("StigmataType").gameObject.SetActive(false); base.transform.Find("UnidentifyText").gameObject.SetActive(false); base.transform.Find("QuestionMark").gameObject.SetActive(false); base.transform.Find("MinusBtn").gameObject.SetActive(false); if (this._item == null) { base.transform.Find("ItemIcon").gameObject.SetActive(false); base.transform.Find("Text").gameObject.SetActive(false); } else { base.transform.Find("ItemIcon").gameObject.SetActive(true); base.transform.Find("Text").gameObject.SetActive(true); Sprite spriteByPrefab = Miscs.GetSpriteByPrefab(item.GetIconPath()); base.transform.Find("ItemIcon/Icon").GetComponent <Image>().sprite = spriteByPrefab; base.transform.Find("ItemIcon").GetComponent <Image>().color = Color.white; base.transform.Find("ItemIcon").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(MiscData.Config.ItemRarityBGImgPath[item.rarity]); if ((this._item is WeaponDataItem) || (this._item is StigmataDataItem)) { base.transform.Find("Text").GetComponent <Text>().text = "LV." + item.level; } else if (this._item is MaterialDataItem) { string str = "\x00d7" + item.number; if (selectMode == SelectMode.ConsumeMaterial) { StorageDataItemBase base2 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(this._item.ID); int num = (base2 != null) ? base2.number : 0; if (this._item.number > num) { str = MiscData.AddColor("WarningRed", num + " / ") + MiscData.AddColor("TotalBlack", this._item.number.ToString()); } else { str = MiscData.AddColor("TotalBlack", num + " / " + this._item.number); } } base.transform.Find("Text").GetComponent <Text>().text = str; } else if (this._item is AvatarFragmentDataItem) { base.transform.Find("Text").GetComponent <Text>().text = "\x00d7" + item.number; } else { base.transform.Find("Text").gameObject.SetActive(false); } this.SetupRarityView(); this.SetupStigmataTypeIcon(); if (selectMode != SelectMode.None) { this.SetupSelectedView(isSelected); } else { base.transform.Find("BG/Unselected").gameObject.SetActive(true); base.transform.Find("BG/Selected").gameObject.SetActive(false); } if (this.showProtected) { this.SetupProtectedView(); } this.SetupBlockSelectView(); this.SetupCostView(bShowCostOver); this.SetupUsedView(bUsed); base.transform.Find("ItemIcon/Icon").GetComponent <Image>().material = null; base.transform.Find("ItemIcon/Icon").GetComponent <Image>().color = MiscData.GetColor("TotalWhite"); if (this._item is StigmataDataItem) { this.SetupStigmataAffixView((this._item as StigmataDataItem).IsAffixIdentify); } } }
private void SetupLvInfoPanel() { base.view.transform.Find("Lv/InfoRowLv/Lv/CurrentLevelNum").GetComponent <Text>().text = this.storageItem.level.ToString(); base.view.transform.Find("Lv/InfoRowLv/Lv/MaxLevelNum").GetComponent <Text>().text = this.storageItem.GetMaxLevel().ToString(); if (this.storageItem.level == this.storageItem.GetMaxLevel()) { base.view.transform.Find("Lv/InfoRowLv/Lv/MaxLevelNum").GetComponent <Text>().color = MiscData.GetColor("Yellow"); } base.view.transform.Find("Lv/InfoRowLv/Exp/NumText").GetComponent <Text>().text = this.storageItem.exp.ToString(); base.view.transform.Find("Lv/InfoRowLv/Exp/MaxNumText").GetComponent <Text>().text = this.storageItem.GetMaxExp().ToString(); base.view.transform.Find("Lv/InfoRowLv/Exp/TiltSlider").GetComponent <MonoMaskSlider>().UpdateValue((float)this.storageItem.exp, (float)this.storageItem.GetMaxExp(), 0f); }
private void SetUpAvatarDispatched(bool isDispatched) { base.transform.Find("Icon").GetComponent <Image>().color = !isDispatched?MiscData.GetColor("TotalWhite") : MiscData.GetColor("EndlessEnergyRunout"); }
private void SetupCurrencyColor(bool isEnough, int index) { if (!isEnough) { if (this._isMultiCurrency) { base.transform.Find(string.Format("BG/Unselected/NowPrize/{0}/Num", index)).GetComponent <Text>().color = MiscData.GetColor("WarningRed"); base.transform.Find(string.Format("BG/Unselected/NowPrize/{0}/x", index)).GetComponent <Text>().color = MiscData.GetColor("WarningRed"); base.transform.Find(string.Format("BG/Selected/NowPrize/{0}/Num", index)).GetComponent <Text>().color = MiscData.GetColor("WarningRed"); base.transform.Find(string.Format("BG/Selected/NowPrize/{0}/x", index)).GetComponent <Text>().color = MiscData.GetColor("WarningRed"); } else { base.transform.Find("BG/Unselected/NowPrize/Num").GetComponent <Text>().color = MiscData.GetColor("WarningRed"); base.transform.Find("BG/Unselected/NowPrize/x").GetComponent <Text>().color = MiscData.GetColor("WarningRed"); base.transform.Find("BG/Selected/NowPrize/Num").GetComponent <Text>().color = MiscData.GetColor("WarningRed"); base.transform.Find("BG/Selected/NowPrize/x").GetComponent <Text>().color = MiscData.GetColor("WarningRed"); } } else if (this._isMultiCurrency) { base.transform.Find(string.Format("BG/Unselected/NowPrize/{0}/Num", index)).GetComponent <Text>().color = MiscData.GetColor("Black"); base.transform.Find(string.Format("BG/Unselected/NowPrize/{0}/x", index)).GetComponent <Text>().color = MiscData.GetColor("Black"); base.transform.Find(string.Format("BG/Selected/NowPrize/{0}/Num", index)).GetComponent <Text>().color = MiscData.GetColor("Black"); base.transform.Find(string.Format("BG/Selected/NowPrize/{0}/x", index)).GetComponent <Text>().color = MiscData.GetColor("Black"); } else { base.transform.Find("BG/Unselected/NowPrize/Num").GetComponent <Text>().color = MiscData.GetColor("Black"); base.transform.Find("BG/Unselected/NowPrize/x").GetComponent <Text>().color = MiscData.GetColor("Black"); base.transform.Find("BG/Selected/NowPrize/Num").GetComponent <Text>().color = MiscData.GetColor("Black"); base.transform.Find("BG/Selected/NowPrize/x").GetComponent <Text>().color = MiscData.GetColor("Black"); } }
private void SetItemDefaultColor() { base.transform.Find("BG/Unselected/FrameTop").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultUnselectedTop"); base.transform.Find("BG/Unselected/FrameBottom").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultUnselectedBottom"); Transform transform = base.transform.Find("BG/Unselected/NowPrize"); if (this._isMultiCurrency) { IEnumerator enumerator = transform.GetEnumerator(); try { while (enumerator.MoveNext()) { Transform current = (Transform)enumerator.Current; current.Find("Image").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultIcon"); current.Find("Num").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultUnselectedPrice"); current.Find("x").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultUnselectedPriceX"); } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable == null) { } disposable.Dispose(); } } else { transform.Find("Image").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultIcon"); transform.Find("Num").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultUnselectedPrice"); transform.Find("x").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultUnselectedPriceX"); } base.transform.Find("BG/Unselected/FakePrize/Num").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultDiscountNum"); base.transform.Find("BG/Unselected/FakePrize/Num/Line").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultDiscountLine"); base.transform.Find("BG/Selected/FrameTop").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultSelectedTop"); Transform transform3 = base.transform.Find("BG/Selected/NowPrize"); if (this._isMultiCurrency) { IEnumerator enumerator2 = transform3.GetEnumerator(); try { while (enumerator2.MoveNext()) { Transform transform4 = (Transform)enumerator2.Current; transform4.Find("Image").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultIcon"); transform4.Find("Num").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultSelectedPrice"); transform4.Find("x").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultSelectedPriceX"); } } finally { IDisposable disposable2 = enumerator2 as IDisposable; if (disposable2 == null) { } disposable2.Dispose(); } } else { transform3.Find("Image").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultIcon"); transform3.Find("Num").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultSelectedPrice"); transform3.Find("x").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultSelectedPriceX"); } base.transform.Find("BG/Selected/FakePrize/Num").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultDiscountNum"); base.transform.Find("BG/Selected/FakePrize/Num/Line").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultDiscountLine"); base.transform.Find("ItemIcon").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultIcon"); for (int i = 1; i < 6; i++) { Transform transform5 = base.transform.Find("Star/" + i.ToString()); if (transform5 != null) { transform5.GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultIcon"); } } for (int j = 1; j < 6; j++) { Transform transform6 = base.transform.Find("AvatarStar/" + j.ToString()); if (transform6 != null) { transform6.GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultIcon"); } } base.transform.Find("StigmataType/Image").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultIcon"); base.transform.Find("FragmentIcon").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsDefaultIcon"); base.transform.Find("NumPanel/Num/Num").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultNum"); base.transform.Find("NumPanel/Num/x").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultNumX"); base.transform.Find("LevelPanel/Num/Num").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultNum"); base.transform.Find("LevelPanel/Num/Lv").GetComponent <Text>().color = MiscData.GetColor("ShopGoodsDefaultLevel"); }
private void SetItemGrey() { base.transform.Find("BG/Unselected/FrameTop").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsGreyTop"); base.transform.Find("BG/Unselected/FrameBottom").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsGreyBG"); base.transform.Find("BG/Unselected/NowPrize").gameObject.SetActive(false); base.transform.Find("BG/Unselected/FakePrize").gameObject.SetActive(false); base.transform.Find("BG/Unselected/Empty").gameObject.SetActive(true); Color color = base.transform.Find("BG/Unselected/Image").GetComponent <Image>().color; color.a = 0.5f; base.transform.Find("BG/Unselected/Image").GetComponent <Image>().color = color; base.transform.Find("BG/Selected/FrameTop").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsGreyTop"); base.transform.Find("BG/Selected/NowPrize").gameObject.SetActive(false); base.transform.Find("BG/Selected/FakePrize").gameObject.SetActive(false); base.transform.Find("BG/Selected/Empty").gameObject.SetActive(true); color = base.transform.Find("BG/Unselected/Image").GetComponent <Image>().color; color.a = 0.5f; base.transform.Find("BG/Selected/Image").GetComponent <Image>().color = color; base.transform.Find("ItemIcon").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsGreyIcon"); base.transform.Find("ItemIcon/SellOut").gameObject.SetActive(true); base.transform.Find("StigmataType/Image").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsGreyIcon"); base.transform.Find("FragmentIcon").GetComponent <Image>().color = MiscData.GetColor("ShopGoodsGreyIcon"); base.transform.Find("SaleLabel/Bg").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab("SpriteOutput/ShopIcons/SalePatternGrey"); }
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); }
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 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; } } }
private void OnTabSetActive(bool active, GameObject go, Button btn) { btn.GetComponent <Image>().color = !active?MiscData.GetColor("TabGreen") : Color.white; btn.transform.Find("Text").GetComponent <Text>().color = !active ? Color.white : MiscData.GetColor("Black"); btn.interactable = !active; go.SetActive(active); }
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(); } } }
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); }