public override void OnRegister() { base.OnRegister(); this.View.ButtonAddListening(this.View.ApplyCloseButton, () => { UIManager.Instance.HideUI(UIViewID.COMPETITION_VIEW); }); this.View.ButtonAddListening(this.View.ApplyButton, () => { ApplyCompetitionC2S package = new ApplyCompetitionC2S(); NetMgr.Instance.SendBuff <ApplyCompetitionC2S>(SocketType.HALL, MsgNoC2S.REQUEST_APPLYCOMPETITION_C2S.GetHashCode(), 0, package); }); this.View.ButtonAddListening(this.View.RuleButton, () => { this.View.ApplyPass.gameObject.SetActive(false); UIManager.Instance.HidenDOTween(this.View.Apply.GetComponent <RectTransform>(), () => { this.View.Apply.gameObject.SetActive(false); UIManager.Instance.ShowDOTween(this.View.Rule.GetComponent <RectTransform>()); this.View.Rule.gameObject.SetActive(true); }); }); this.View.ButtonAddListening(this.View.RuleCloseButton, () => { this.View.ApplyPass.gameObject.SetActive(false); UIManager.Instance.HidenDOTween(this.View.Rule.GetComponent <RectTransform>(), () => { this.View.Apply.gameObject.SetActive(true); UIManager.Instance.ShowDOTween(this.View.Apply.GetComponent <RectTransform>()); this.View.Rule.gameObject.SetActive(false); }); }); this.View.ButtonAddListening(this.View.ApplyPassCloseButton, () => { UIManager.Instance.HideUI(UIViewID.COMPETITION_VIEW); }); }
/// <summary> /// 申请加入比赛 /// </summary> private void ApplyHandler() { ApplyCompetitionC2S package = new ApplyCompetitionC2S(); NetMgr.Instance.SendBuff <ApplyCompetitionC2S>(SocketType.HALL, MsgNoC2S.C2S_Hall_APPLY_COMPETITION.GetHashCode(), 0, package); }