Esempio n. 1
0
 public void Refresh(ActivityValueData data)
 {
     if (data == null)
     {
         return;
     }
     if (this.AVData != data)
     {
         this.AVData = data;
         this.mTitle.text = this.AVData.Base.Name;
         this.mContent.text = this.AVData.Base.Desc;
     }
 }
Esempio n. 2
0
 public void InitWithBaseScene(ActivityValueData data)
 {
     this.AVData = data;
     this.mIsChecked = false;
     this.CreateObjects();
     this.Text = data.Base.Name;
     this.Icon = "ar";
     base.gameObject.name = string.Format("cv{0}", data.Base.ID);
 }
Esempio n. 3
0
 private GUIRewardCheckBtn InitActivityCheckBtn(ActivityValueData data)
 {
     if (Tools.GetRemainAARewardTime(data.Base.CloseTimeStamp) <= 0)
     {
         return null;
     }
     if (this.RewardCheckBtnPrefab == null)
     {
         this.RewardCheckBtnPrefab = Res.LoadGUI("GUI/GUIRewardCheckBtn");
     }
     if (this.RewardCheckBtnPrefab == null)
     {
         global::Debug.LogError(new object[]
         {
             "Res.Load GUI/GUIRewardCheckBtn error"
         });
         return null;
     }
     GameObject gameObject = Tools.AddChild(this.mTabBtnsTable.gameObject, this.RewardCheckBtnPrefab);
     GUIRewardCheckBtn gUIRewardCheckBtn = gameObject.AddComponent<GUIRewardCheckBtn>();
     gUIRewardCheckBtn.InitWithBaseScene(data);
     gUIRewardCheckBtn.IsShowMark = !GUIReward.ActivityValueReview.Contains(data.Base.ID);
     GUIRewardCheckBtn expr_A3 = gUIRewardCheckBtn;
     expr_A3.CheckChangeCallbackEvent = (GUIRewardCheckBtn.CheckChangeCallback)Delegate.Combine(expr_A3.CheckChangeCallbackEvent, new GUIRewardCheckBtn.CheckChangeCallback(this.OnActivityValueBtnsChanged));
     return gUIRewardCheckBtn;
 }
Esempio n. 4
0
 private void OnActivityValueUpdateEvent(ActivityValueData data)
 {
     if (data == null || !this.mActivityValueInfo.gameObject.activeSelf)
     {
         return;
     }
     this.mActivityValueInfo.Refresh(data);
     if (this.mActivityValueInfo.AVData == data)
     {
         this.mActivityValueInfo.Refresh(data);
     }
 }
Esempio n. 5
0
 private void OnActivityValueAddEvent(ActivityValueData data)
 {
     GUIRewardCheckBtn gUIRewardCheckBtn = this.InitActivityCheckBtn(data);
     if (gUIRewardCheckBtn != null)
     {
         this.mTabs.Add(gUIRewardCheckBtn);
         gUIRewardCheckBtn.IsShowMark = true;
         this.mTabBtnsTable.repositionNow = true;
     }
 }
Esempio n. 6
0
 protected void CreateObjects()
 {
     this.mActivityValueData = Globals.Instance.Player.ActivitySystem.GetValueMod(3);
     GameObject parent = GameUITools.FindGameObject("Window", base.gameObject);
     this.mCounter = GameUITools.FindUILabel("Counter", parent);
     this.mCostValue = GameUITools.FindUILabel("Cost/Value", parent);
     Transform transform = GameUITools.FindGameObject("Quests", parent).transform;
     if (transform.childCount != 3)
     {
         global::Debug.LogErrorFormat("Activity KingReward QuestItem Num Error ,NUM :{0}", new object[]
         {
             transform.childCount
         });
         return;
     }
     for (int i = 0; i < 3; i++)
     {
         this.mQuests[i] = transform.GetChild(i).gameObject.AddComponent<KingRewardQuestItem>();
         this.mQuests[i].Init(this);
     }
     GameUITools.RegisterClickEvent("ShopBtn", new UIEventListener.VoidDelegate(this.OnShopBtnClick), parent);
     GameUITools.RegisterClickEvent("RefreshBtn", new UIEventListener.VoidDelegate(this.OnRefreshBtnClick), parent);
 }
Esempio n. 7
0
 private void CreateObjects()
 {
     this.mActivityValueData = Globals.Instance.Player.ActivitySystem.GetValueMod(5);
     this.lowItemCount = Globals.Instance.Player.ItemSystem.GetLowRollItemCount();
     this.highItemCount = Globals.Instance.Player.ItemSystem.GetHighRollItemCount();
     GameObject parent = GameUITools.RegisterClickEvent("Low", new UIEventListener.VoidDelegate(this.OnLowClick), base.gameObject);
     this.lowRed = GameUITools.FindUISprite("Red", parent);
     GameUITools.RegisterClickEvent("View", new UIEventListener.VoidDelegate(this.OnLowViewClick), parent);
     this.lowFreeTime = GameUITools.FindUILabel("FreeTime", parent);
     parent = GameUITools.FindGameObject("Cost", parent);
     this.lowCostIcon = GameUITools.FindUISprite("Icon", parent);
     this.lowCostFree = GameUITools.FindUILabel("Free", parent);
     this.lowCostValue = GameUITools.FindUILabel("Value", parent);
     parent = GameUITools.RegisterClickEvent("High", new UIEventListener.VoidDelegate(this.OnHighClick), base.gameObject);
     this.highRed = GameUITools.FindUISprite("Red", parent);
     this.highNextDesc = GameUITools.FindUILabel("NextDesc", parent);
     GameUITools.RegisterClickEvent("View", new UIEventListener.VoidDelegate(this.OnHighViewClick), parent);
     this.highFreeTime = GameUITools.FindUILabel("FreeTime", parent);
     parent = GameUITools.FindGameObject("Cost", parent);
     this.highCostIcon = GameUITools.FindUISprite("Icon", parent);
     this.highCostFree = GameUITools.FindUILabel("Free", parent);
     this.highCostValue = GameUITools.FindUILabel("Value", parent);
     LuckyRollInfo info = Globals.Instance.AttDB.LuckyRollDict.GetInfo(1);
     int luckyRoll2Count = Globals.Instance.Player.Data.LuckyRoll2Count;
     int num = info.Count[0];
     int num2 = info.Count[1] + num;
     if (luckyRoll2Count < num2 - 1)
     {
         this.highNextDesc.text = Singleton<StringManager>.Instance.GetString("rollNextDesc", new object[]
         {
             num2 - luckyRoll2Count,
             Singleton<StringManager>.Instance.GetString("rollOrangePet")
         });
     }
     else if (luckyRoll2Count == num2 - 1)
     {
         this.highNextDesc.text = Singleton<StringManager>.Instance.GetString("rollThisTime", new object[]
         {
             Singleton<StringManager>.Instance.GetString("rollOrangePet")
         });
     }
     else
     {
         global::Debug.LogErrorFormat("highRollCount error : {0} ", new object[]
         {
             luckyRoll2Count
         });
         this.highNextDesc.text = luckyRoll2Count.ToString();
     }
     this.lowCostValue.text = GameConst.GetInt32(37).ToString();
     if (Globals.Instance.Player.ItemSystem.GetLowRollItemCount() < GameConst.GetInt32(37))
     {
         this.lowCostValue.color = Color.red;
     }
     if (GUIRollSceneV2.IsLowRollFree())
     {
         this.ChangeFreeState(0, 1);
     }
     else
     {
         this.ChangeFreeState(0, 0);
     }
     if (GUIRollSceneV2.IsHighRollFree())
     {
         this.ChangeFreeState(1, 1);
     }
     else
     {
         this.ChangeFreeState(1, 0);
     }
 }
Esempio n. 8
0
 private void CreateObjects()
 {
     this.mActivityValueData = Globals.Instance.Player.ActivitySystem.GetValueMod(5);
     if (this.mActivityValueData == null)
     {
         this.oneCost = GameConst.GetInt32(41);
         this.tenCost = GameConst.GetInt32(42);
     }
     else
     {
         this.oneCost = GameConst.GetInt32(41) * this.mActivityValueData.Value1 / 100;
         this.tenCost = GameConst.GetInt32(42) * this.mActivityValueData.Value1 / 100;
     }
     this.mBG = GameUITools.FindGameObject("BG", base.gameObject).GetComponent<UITexture>();
     this.mStage = GameUITools.FindGameObject("Stage", base.gameObject).GetComponent<UITexture>();
     GameObject gameObject = GameUITools.FindGameObject("Window/Title", base.gameObject);
     this.mTitleName = GameUITools.FindUILabel("Name", gameObject);
     this.mTitleDesc0 = GameUITools.FindUILabel("Desc0", gameObject);
     this.mTitleDesc1 = GameUITools.FindUILabel("Desc1", gameObject);
     this.mTitleElement = GameUITools.FindUISprite("Element", gameObject);
     this.mTitleType = GameUITools.FindUISprite("Type", gameObject);
     gameObject = gameObject.transform.parent.gameObject;
     this.mSlot = GameUITools.FindGameObject("Slot", gameObject);
     this.mUI62_1 = GameUITools.FindGameObject("ui62_1", gameObject);
     Tools.SetParticleRQWithUIScale(this.mUI62_1, this.UI62_1RQ);
     this.mUI62_1.SetActive(false);
     this.mUI62_2 = GameUITools.FindGameObject("ui62_2", gameObject);
     Tools.SetParticleRQWithUIScale(this.mUI62_2, 3002);
     this.mUI62_2.SetActive(false);
     this.mCloseBtn = GameUITools.RegisterClickEvent("CloseBtn", new UIEventListener.VoidDelegate(this.OnCloseClick), gameObject);
     this.mViewBtn = GameUITools.RegisterClickEvent("ViewBtn", new UIEventListener.VoidDelegate(this.OnViewBtnClick), gameObject);
     gameObject = GameUITools.FindGameObject("Currency", gameObject);
     this.mCurrencyIcon = GameUITools.FindUISprite("Icon", gameObject);
     this.mCurrencyValue = GameUITools.FindUILabel("Value", gameObject);
     this.mCurrencyAdd = GameUITools.RegisterClickEvent("Add", new UIEventListener.VoidDelegate(this.OnCurrencyAddClic), gameObject).GetComponent<UISprite>();
     gameObject = gameObject.transform.parent.gameObject;
     this.mNextDesc = GameUITools.FindUILabel("NextDesc/Txt", gameObject);
     this.mRollOne = GameUITools.RegisterClickEvent("RollOne", new UIEventListener.VoidDelegate(this.OnRollOneClick), gameObject);
     this.mRollTen = GameUITools.RegisterClickEvent("RollTen", new UIEventListener.VoidDelegate(this.OnRollTenClick), gameObject);
     this.mRollTenBtn = this.mRollTen.GetComponent<UIButton>();
     this.mRollAgain = GameUITools.RegisterClickEvent("RollAgain", new UIEventListener.VoidDelegate(this.OnRollAgainClick), gameObject);
     this.mRollAgain = GameUITools.FindGameObject("RollAgain", gameObject);
     this.mOK = GameUITools.RegisterClickEvent("OK", new UIEventListener.VoidDelegate(this.OnOKClick), gameObject);
     this.mRewards = GameUITools.FindGameObject("Rewards", gameObject);
     gameObject = GameUITools.FindGameObject("Cost", this.mRollOne);
     this.mOneCostIcon = GameUITools.FindUISprite("Icon", gameObject);
     this.mOneCostValue = GameUITools.FindUILabel("Value", gameObject);
     this.mOneCostFree = GameUITools.FindUILabel("Free", gameObject);
     gameObject = GameUITools.FindGameObject("Cost", this.mRollTen);
     this.mTenCostIcon = GameUITools.FindUISprite("Icon", gameObject);
     this.mTenCostValue = GameUITools.FindUILabel("Value", gameObject);
     this.mAgainTxt = GameUITools.FindUILabel("Txt", this.mRollAgain);
     gameObject = GameUITools.FindGameObject("Cost", this.mRollAgain);
     this.mAgainIcon = GameUITools.FindUISprite("Icon", gameObject);
     this.mAgainValue = GameUITools.FindUILabel("Value", gameObject);
     this.mAgainFree = GameUITools.FindUILabel("Free", gameObject);
     this.mTenBG = GameUITools.FindUISprite("TenBG", this.mRollAgain.transform.parent.gameObject);
     this.mTitleName.transform.parent.gameObject.SetActive(false);
     this.mNextDesc.transform.parent.gameObject.SetActive(false);
     this.mCurrencyValue.transform.parent.gameObject.SetActive(false);
     this.mRollOne.SetActive(false);
     this.mRollAgain.SetActive(false);
     this.mRollTen.SetActive(false);
     this.mOK.SetActive(false);
 }