private void OnResume() { MessageHandler.RegisterMessageHandler(MessageDefine.SCSceneResumeResponse, OnResponse); CSSceneResumeRequest resumeReq = new CSSceneResumeRequest(); resumeReq.PlayerId = GlobalInfo.MY_PLAYER_ID; GameEvents.NetWorkEvents.SendMsg.SafeInvoke(resumeReq); }
private void OnMaskClick(Vector2 worldPos, bool inner) { if (inner) { gesture = new Gesture(); GameObject obj = gesture.GetCurrentPickedObject(); if (obj != null) { gesture.pickedObject = obj; } MessageHandler.RegisterMessageHandler(MessageDefine.SCSceneResumeResponse, OnResponse); CSSceneResumeRequest resumeReq = new CSSceneResumeRequest(); resumeReq.PlayerId = GlobalInfo.MY_PLAYER_ID; GameEvents.NetWorkEvents.SendMsg.SafeInvoke(resumeReq); } }
private void OnBtnContinueClick(GameObject btnContinue) { EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, EngineCommonAudioKey.Button_Click_Common.ToString()); if (null == m_data) { DebugUtil.LogError("暂停菜单不知道是哪里调用的暂停"); this.CloseFrame(); return; } if (ENUM_SEARCH_MODE.E_SEARCH_ROOM == m_data.m_mode) { CSSceneResumeRequest resumeReq = new CSSceneResumeRequest(); resumeReq.PlayerId = GlobalInfo.MY_PLAYER_ID; #if !NETWORK_SYNC || UNITY_EDITOR GameEvents.NetWorkEvents.SendAsyncMsg.SafeInvoke(resumeReq); #else GameEvents.NetWorkEvents.SendMsg.SafeInvoke(resumeReq); #endif } else if (ENUM_SEARCH_MODE.E_JIGSAW == m_data.m_mode) { CSResumeRequest resumeReq = new CSResumeRequest(); resumeReq.PlayerId = GlobalInfo.MY_PLAYER_ID; #if !NETWORK_SYNC || UNITY_EDITOR GameEvents.NetWorkEvents.SendAsyncMsg.SafeInvoke(resumeReq); #else GameEvents.NetWorkEvents.SendMsg.SafeInvoke(resumeReq); #endif } else if (ENUM_SEARCH_MODE.E_EVENTGAME == m_data.m_mode) { this.CloseFrame(); } else if (ENUM_SEARCH_MODE.E_SCAN == m_data.m_mode) { this.CloseFrame(); //调用继续游戏 GameEvents.UIEvents.UI_Scan_Event.Listen_ResumeGame.SafeInvoke(); } }