示例#1
0
 public void Refresh(GUIRewardCheckBtn btn)
 {
     this.mCheckBtn = btn;
     if (this.mCheckBtn.ActivateObj == null)
     {
         this.mCheckBtn.ActivateObj = base.gameObject;
     }
     this.GetActivityDesc(this.mCheckBtn.ActivityType);
 }
 public void InitWithBaseScene(GUIReward baseScene, GUIRewardCheckBtn btn)
 {
     this.mBaseScene = baseScene;
     this.mCheckBtn = btn;
     this.CreateObjects();
 }
示例#3
0
 private void InitActivityBtns()
 {
     if (GUIRewardDartInfo.IsVisible)
     {
         this.mTabDart = this.InitActivityCheckBtn(EActivityType.EAT_Dart, Singleton<StringManager>.Instance.GetString("activityDartTitle"));
     }
     if (GUIRewardScratchOffInfo.IsVisible)
     {
         this.mTabScratchOff = this.InitActivityCheckBtn(EActivityType.EAT_ScratchOff, Singleton<StringManager>.Instance.GetString("activityScratchOffTitle"));
     }
     if (GUIRewardLuckyDrawInfo.IsVisible)
     {
         this.mTabLuckyDraw = this.InitActivityCheckBtn(EActivityType.EAT_LuckyDraw, Singleton<StringManager>.Instance.GetString("activityLuckyDrawTitle"));
     }
     if (GUIRewardFlashSaleInfo.IsVisible)
     {
         this.mTabFlashSale = this.InitActivityCheckBtn(EActivityType.EAT_FlashSale, Singleton<StringManager>.Instance.GetString("activityFlashSaleTitle"));
     }
     if (GUIRewardTreeInfo.IsVisible)
     {
         this.mTabTree = this.InitActivityCheckBtn(EActivityType.EAT_RollEquip, Globals.Instance.Player.ActivitySystem.REData.Base.Name);
     }
     LocalPlayer player = Globals.Instance.Player;
     List<ActivityShopData> activityShops = player.ActivitySystem.ActivityShops;
     GUIRewardCheckBtn gUIRewardCheckBtn;
     for (int i = 0; i < activityShops.Count; i++)
     {
         ActivityShopData activityShopData = activityShops[i];
         if (activityShopData != null && activityShopData.Type != 1)
         {
             gUIRewardCheckBtn = this.InitActivityCheckBtn(activityShopData);
             if (gUIRewardCheckBtn != null)
             {
                 this.mTabs.Add(gUIRewardCheckBtn);
             }
         }
     }
     ActivityGroupBuyingData gBData = player.ActivitySystem.GBData;
     gUIRewardCheckBtn = this.InitActivityCheckBtn(gBData);
     if (gUIRewardCheckBtn != null)
     {
         this.mTabs.Add(gUIRewardCheckBtn);
     }
     List<ActivityPayShopData> aPSDatas = player.ActivitySystem.APSDatas;
     for (int j = 0; j < aPSDatas.Count; j++)
     {
         ActivityPayShopData activityPayShopData = aPSDatas[j];
         if (activityPayShopData != null)
         {
             gUIRewardCheckBtn = this.InitActivityCheckBtn(activityPayShopData);
             if (gUIRewardCheckBtn != null)
             {
                 this.mTabs.Add(gUIRewardCheckBtn);
             }
         }
     }
     List<ActivityAchievementData> aADatas = player.ActivitySystem.AADatas;
     for (int k = 0; k < aADatas.Count; k++)
     {
         ActivityAchievementData data = aADatas[k];
         gUIRewardCheckBtn = this.InitActivityCheckBtn(data);
         if (gUIRewardCheckBtn != null)
         {
             this.mTabs.Add(gUIRewardCheckBtn);
         }
     }
     List<ActivityValueData> aVDatas = player.ActivitySystem.AVDatas;
     for (int l = 0; l < aVDatas.Count; l++)
     {
         ActivityValueData data2 = aVDatas[l];
         gUIRewardCheckBtn = this.InitActivityCheckBtn(data2);
         if (gUIRewardCheckBtn != null)
         {
             this.mTabs.Add(gUIRewardCheckBtn);
         }
     }
     ActivitySpecifyPayData sPData = player.ActivitySystem.SPData;
     gUIRewardCheckBtn = this.InitActivityCheckBtn(sPData);
     if (gUIRewardCheckBtn != null)
     {
         this.mTabs.Add(gUIRewardCheckBtn);
     }
     this.mTabBtnsTable.repositionNow = true;
 }
示例#4
0
 private void CreateObjects()
 {
     GameUIManager.mInstance.GetTopGoods().Show("activityLb");
     this.mWinBg = base.transform.Find("WinBg");
     UILabel uILabel = GameUITools.FindUILabel("Date", this.mWinBg.gameObject);
     DateTime dateTime = Tools.ServerDateTime(Globals.Instance.Player.GetTimeStamp());
     uILabel.text = Singleton<StringManager>.Instance.GetString("RewardDate", new object[]
     {
         dateTime.Year,
         string.Format("{0:D2}", dateTime.Month),
         string.Format("{0:D2}", dateTime.Day)
     });
     this.mTopBtn = base.RegisterClickEvent("TopBtn", new UIEventListener.VoidDelegate(this.OnTopBtnClick), this.mWinBg.gameObject);
     this.mTopBtn.gameObject.SetActive(false);
     this.mBottomBtn = base.RegisterClickEvent("BottomBtn", new UIEventListener.VoidDelegate(this.OnBottomBtnClick), this.mWinBg.gameObject);
     this.mBottomBtn.gameObject.SetActive(false);
     Transform transform = this.mWinBg.Find("leftTabs");
     this.mTabBtnsTable = transform.Find("tabBtnsPanel/tabBtns").GetComponent<UIGrid>();
     this.mTabBtnScrollBar = transform.Find("scrollBar").GetComponent<UIScrollBar>();
     EventDelegate.Add(this.mTabBtnScrollBar.onChange, new EventDelegate.Callback(this.OnScrollBarValueChange));
     this.mTabLevelReward = this.mTabBtnsTable.transform.Find("tabLevel").gameObject.AddComponent<GUIRewardCheckBtn>();
     this.mTabLevelReward.InitWithBaseScene(false, "a00", "ar");
     GUIRewardCheckBtn expr_1BE = this.mTabLevelReward;
     expr_1BE.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_1BE.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnLevelCheckChanged));
     this.mTabEnergy = this.mTabBtnsTable.transform.Find("tabKeys").gameObject.AddComponent<GUIRewardCheckBtn>();
     this.mTabEnergy.InitWithBaseScene(false, "a01", "Keys");
     GUIRewardCheckBtn expr_220 = this.mTabEnergy;
     expr_220.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_220.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnKeysRewardChanged));
     this.mTabSoulReliquary = this.mTabBtnsTable.transform.Find("tabSoulReliquary").gameObject.AddComponent<GUIRewardCheckBtn>();
     this.mTabSoulReliquary.InitWithBaseScene(false, "b00", "SoulIcon");
     GUIRewardCheckBtn expr_282 = this.mTabSoulReliquary;
     expr_282.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_282.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnSoulReliquaryChanged));
     this.mTabShare = this.mTabBtnsTable.transform.Find("tabShare").gameObject.AddComponent<GUIRewardCheckBtn>();
     this.mTabShare.InitWithBaseScene(false, "z10", "Share");
     GUIRewardCheckBtn expr_2E4 = this.mTabShare;
     expr_2E4.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_2E4.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnShareCheckChanged));
     this.mTabDay7Login = this.mTabBtnsTable.transform.Find("tabDay7").gameObject.AddComponent<GUIRewardCheckBtn>();
     this.mTabDay7Login.InitWithBaseScene(false, "b00", "7Days");
     GUIRewardCheckBtn expr_346 = this.mTabDay7Login;
     expr_346.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_346.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnDay7CheckChanged));
     this.mTabCards = this.mTabBtnsTable.transform.Find("tabCards").gameObject.AddComponent<GUIRewardCheckBtn>();
     this.mTabCards.InitWithBaseScene(false, "t00", "Card");
     GUIRewardCheckBtn expr_3A8 = this.mTabCards;
     expr_3A8.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_3A8.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnCardsRewardChanged));
     this.mTabVip = this.mTabBtnsTable.transform.Find("tabVIP").gameObject.AddComponent<GUIRewardCheckBtn>();
     this.mTabVip.InitWithBaseScene(false, "a04", "VIP");
     GUIRewardCheckBtn expr_40A = this.mTabVip;
     expr_40A.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_40A.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnVipRewardChanged));
     this.mTabVip.IsShowMark = false;
     this.mTabWeekVip = this.mTabBtnsTable.transform.Find("tabWeekVIP").gameObject.AddComponent<GUIRewardCheckBtn>();
     this.mTabWeekVip.InitWithBaseScene(false, "a03", "VIP");
     GUIRewardCheckBtn expr_478 = this.mTabWeekVip;
     expr_478.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_478.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnVipWeekRewardChanged));
     this.mTabWeekVip.IsShowMark = false;
     this.mFundReward = this.mTabBtnsTable.transform.Find("tabFund").gameObject.AddComponent<GUIRewardCheckBtn>();
     this.mFundReward.InitWithBaseScene(false, "a02", "fund");
     GUIRewardCheckBtn expr_4E6 = this.mFundReward;
     expr_4E6.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_4E6.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnFundRewardChanged));
     this.mTabLevelReward.gameObject.SetActive(false);
     this.mTabShare.gameObject.SetActive(false);
     this.mTabDay7Login.gameObject.SetActive(false);
     this.mTabEnergy.gameObject.SetActive(false);
     this.mTabCards.gameObject.SetActive(false);
     this.mTabVip.gameObject.SetActive(false);
     this.mTabWeekVip.gameObject.SetActive(false);
     this.mTabSoulReliquary.gameObject.SetActive(false);
     this.mFundReward.gameObject.SetActive(false);
     base.StartCoroutine(this.InitScene());
 }
示例#5
0
 private void ChangeTabToAnim(GUIRewardCheckBtn btn)
 {
     int num = this.mTabBtnsTable.GetChildList().IndexOf(btn.transform);
     float num2 = 0f;
     if (num > 4)
     {
         num2 = (float)num / (float)(this.mTabBtnsTable.GetChildList().Count - 5);
     }
     num2 = Mathf.Clamp01(num2);
     HOTween.To(this.mTabBtnScrollBar, 0.15f, new TweenParms().Prop("value", num2));
 }