public GUICostumePartyStartPopUp.TimeBtn Init(int index, GUICostumePartyStartPopUp.TimeBtn.ChangeCallBack cb) { this.mSprite = base.gameObject.GetComponent<UISprite>(); this.index = index; this.ChangeEvent = cb; return this; }
private void CreateObjects() { TopGoods topGoods = GameUIManager.mInstance.GetTopGoods(); topGoods.Show("costumeParty"); GameObject parent = GameUITools.FindGameObject("Panel", base.gameObject); base.RegisterClickEvent("RulesBtn", new UIEventListener.VoidDelegate(this.OnRulesBtnClick), parent); this.mInviteBtn = base.RegisterClickEvent("InviteBtn", new UIEventListener.VoidDelegate(this.OnInviteBtnClick), parent).GetComponent<UISprite>(); this.mTakeBtn = base.RegisterClickEvent("TakeBtn", new UIEventListener.VoidDelegate(this.OnTakeBtnClick), parent).GetComponent<UISprite>(); this.mTakeBtn.gameObject.SetActive(false); this.mTakeTweener = GameUITools.FindGameObject("Take", this.mTakeBtn.gameObject).GetComponents<UITweener>(); this.mUI30 = GameUITools.FindGameObject("ui30", this.mTakeTweener[0].transform.parent.gameObject); GameObject gameObject = GameUITools.FindGameObject("TopRight", parent); this.mLeaveBtn = base.RegisterClickEvent("LeaveBtn", new UIEventListener.VoidDelegate(this.OnLeavaBtnClick), gameObject); this.mMusicBtn = base.RegisterClickEvent("MusicBtn", new UIEventListener.VoidDelegate(this.OnMusicBtnClick), gameObject); this.mLeaveBtn.SetActive(false); this.mMusicBtn.SetActive(false); gameObject = GameUITools.FindGameObject("ProgressBar", parent); this.mBar = GameUITools.FindUISprite("Bar", gameObject); for (int i = 0; i < this.mBar.transform.childCount; i++) { this.mBarPointValues.Add(GameUITools.FindUILabel("Value", this.mBar.transform.GetChild(i).gameObject)); this.mBarPointEffects.Add(GameUITools.FindGameObject("ui65", this.mBar.transform.GetChild(i).gameObject)); Tools.SetParticleRQWithUIScale(this.mBarPointEffects[i], 3200); this.mBarPointEffects[i].SetActive(false); this.mBarPointTweenScale.Add(GameUITools.FindGameObject("Sprite", this.mBar.transform.GetChild(i).gameObject).GetComponent<TweenScale>()); this.mBarPointTweenScale[i].enabled = false; UIEventListener expr_23D = UIEventListener.Get(this.mBar.transform.GetChild(i).gameObject); expr_23D.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_23D.onClick, new UIEventListener.VoidDelegate(this.OnBarPointClick)); } this.mBarValue = GameUITools.FindUILabel("Value", gameObject); gameObject.SetActive(false); this.mMsgWindow = GameUIManager.mInstance.ShowMsgWindow(); this.mMsgWindow.SetAnchor(new Vector4(0f, 488f, 40f, 104f)); this.mMsgWindow.gameObject.SetActive(false); this.mStartBtn = base.RegisterClickEvent("StartBtn", new UIEventListener.VoidDelegate(this.OnStartBtnClick), parent); this.mBtns = GameUITools.FindGameObject("Btns", parent); this.mRoseCD = GameUITools.FindUILabel("CD", base.RegisterClickEvent("Rose", new UIEventListener.VoidDelegate(this.OnRoseClick), this.mBtns)); this.mRoseMask = GameUITools.FindUISprite("Mask", this.mRoseCD.gameObject); this.mDanceCD = GameUITools.FindUILabel("CD", base.RegisterClickEvent("Dance", new UIEventListener.VoidDelegate(this.OnDanceClick), this.mBtns)); this.mDanceMask = GameUITools.FindUISprite("Mask", this.mDanceCD.gameObject); this.mDanceCost = GameUITools.FindUILabel("Cost", this.mDanceCD.transform.parent.gameObject); this.mWandCD = GameUITools.FindUILabel("CD", base.RegisterClickEvent("Wand", new UIEventListener.VoidDelegate(this.OnWandClick), this.mBtns)); this.mWandMask = GameUITools.FindUISprite("Mask", this.mWandCD.gameObject); this.mTurtleCD = GameUITools.FindUILabel("CD", base.RegisterClickEvent("Turtle", new UIEventListener.VoidDelegate(this.OnTurtleClick), this.mBtns)); this.mTurtleMask = GameUITools.FindUISprite("Mask", this.mTurtleCD.gameObject); this.mTurtleCost = GameUITools.FindUILabel("Cost", this.mTurtleCD.transform.parent.gameObject); this.mPleaseLeaveBtn = base.RegisterClickEvent("PleaseLeave", new UIEventListener.VoidDelegate(this.OnPleaseLeaveClick), this.mBtns); this.mFriendBtn = base.RegisterClickEvent("Friend", new UIEventListener.VoidDelegate(this.OnFriendClick), this.mBtns); this.mBtns.transform.localScale = Vector3.zero; this.mPlayers = GameUITools.FindGameObject("Players", parent).transform; for (int j = 0; j < 6; j++) { this.players.Add(GameUITools.FindGameObject(string.Format("{0}", j), this.mPlayers.gameObject).AddComponent<GUICostumePartyPlayerItem>()); this.players[j].InitWithBaseScene(this); } this.mDanceTarget = GameUITools.FindGameObject("DanceTarget", this.mPlayers.gameObject).transform; this.mRoseAnim = GameUITools.FindGameObject("Rose", this.mPlayers.gameObject).transform; this.mRoseAnim.localScale = Vector3.zero; this.mGetReward = GameUITools.FindGameObject("GetReward", parent).GetComponent<UIWidget>(); this.mGetReward.gameObject.SetActive(false); this.mGetRewardBtn = base.RegisterClickEvent("GetBtn", new UIEventListener.VoidDelegate(this.OnGetRewardBtnClick), this.mGetReward.gameObject); this.mGetCDLabel = GameUITools.FindUILabel("CD", this.mGetReward.gameObject); this.mGetRewardItemsContent = GameUITools.FindGameObject("GetRewardItems/Panel/Contents", this.mGetReward.gameObject).GetComponent<UITable>(); base.RegisterClickEvent("BG", new UIEventListener.VoidDelegate(this.OnBGClick), base.gameObject); gameObject = GameUITools.FindGameObject("BottomLeft", parent); this.mNoteToggle = GameUITools.FindGameObject("Note", gameObject).GetComponent<UIToggle>(); EventDelegate.Add(this.mNoteToggle.onChange, new EventDelegate.Callback(this.OnTabCheckChanged)); UIEventListener expr_680 = UIEventListener.Get(this.mNoteToggle.gameObject); expr_680.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_680.onClick, new UIEventListener.VoidDelegate(this.OnTabClick)); this.mMsgToggle = GameUITools.FindGameObject("Msg", gameObject).GetComponent<UIToggle>(); EventDelegate.Add(this.mMsgToggle.onChange, new EventDelegate.Callback(this.OnTabCheckChanged)); UIEventListener expr_6E4 = UIEventListener.Get(this.mMsgToggle.gameObject); expr_6E4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_6E4.onClick, new UIEventListener.VoidDelegate(this.OnTabClick)); GameUITools.RegisterClickEvent("Speak", new UIEventListener.VoidDelegate(this.OnSpeakClick), gameObject); CostumePartyInfo info = Globals.Instance.AttDB.CostumePartyDict.GetInfo(2); this.danceInteractionCost = info.InteractionCost; info = Globals.Instance.AttDB.CostumePartyDict.GetInfo(4); this.turtleInteractionCost = info.InteractionCost; this.mDanceCost.text = this.danceInteractionCost.ToString(); this.mTurtleCost.text = this.turtleInteractionCost.ToString(); this.mStartPopUp = GameUITools.FindGameObject("StartPopUp", base.gameObject).AddComponent<GUICostumePartyStartPopUp>(); this.mStartPopUp.gameObject.SetActive(true); this.mStartPopUp.Hide(); this.mMusicPopUp = GameUITools.FindGameObject("MusicPopUp", base.gameObject).AddComponent<GUICostumePartyMusicPopUp>(); this.mMusicPopUp.Init(this); this.mMusicPopUp.gameObject.SetActive(true); this.mMusicPopUp.Hide(); float factor = 1f / ParticleScaler.GetsRootScaleFactor(); this.SetParticlePosition(GameUITools.FindGameObject("ui49", base.gameObject).transform, factor); this.SetParticlePosition(GameUITools.FindGameObject("ui50", base.gameObject).transform, factor); MC2S_GetCostumePartyData ojb = new MC2S_GetCostumePartyData(); Globals.Instance.CliSession.Send(262, ojb); }