private void receiveData() { try { socket.BeginReceive(buffer, m_BufferSize, m_BufferLength - m_BufferSize, SocketFlags.None, new AsyncCallback((ar) => { try { Socket handler = (Socket)ar.AsyncState; int rLength = handler.EndReceive(ar); if (rLength > 0) { byte[] rData = unPackHead(); EventTool.Run <byte[]>(EventName.SocketClient.ReceiveData, rData); } receiveData(); } catch (Exception e) { socket = null; Debug.LogError("[ServerMng.receiveData]信息接受失败:" + e); } }), socket); } catch (Exception e) { socket = null; Debug.LogError("[ServerMng.receiveData]信息接受失败:" + e); } }
public void Init() { gameObject.SetActive(false); IsOpen = false; // EventTool.Run(EventName.PanelBase.InitFinsh + gameObject.name); }
public void Close() { StopAllCoroutines(); StartCoroutine(playExitAni(() => { gameObject.SetActive(false); IsOpen = false; EventTool.Run(EventName.PanelBase.CloseFinsh + gameObject.name); })); }
public void Open() { StopAllCoroutines(); transform.localScale = Vector3.one; transform.localPosition = Vector3.zero; GetComponent <CanvasGroup>().alpha = 1; gameObject.SetActive(true); IsOpen = true; StartCoroutine(playEnterAni(() => { EventTool.Run(EventName.PanelBase.OpenFinsh + gameObject.name); })); }
void onUploadReccordFileComplete(IGCloudVoice.GCloudVoiceCompleteCode code, string filepath, string fileid) { if (code == IGCloudVoice.GCloudVoiceCompleteCode.GV_ON_UPLOAD_RECORD_DONE) { Debug.Log("OnUploadReccordFileComplete succ, filepath:" + filepath + " fileid len=" + fileid.Length + " fileid:" + fileid + " fileid len=" + fileid.Length); XLua.LuaTable tab = AppMng.luaEnv.NewTable(); tab.Set <string, string> ("fileid", fileid); EventTool.Run("niuniu", "playroom.sendchat", tab); } else { Debug.Log("OnUploadReccordFileComplete error"); } }
public void Close(PanelBaseExitAni[] _exitAni = null) { if (_exitAni == null && exitAni != null) { _exitAni = exitAni; } IsOpen = false; EventTool.Run(EventName.PanelBase.Close + gameObject.name); StopAllCoroutines(); StartCoroutine(playExitAni(() => { gameObject.SetActive(false); EventTool.Run(EventName.PanelBase.CloseFinsh + gameObject.name); }, _exitAni)); }
public void Open(PanelBaseEnterAni[] _enterAni = null) { if (_enterAni == null && enterAni != null) { _enterAni = enterAni; } gameObject.SetActive(true); IsOpen = true; EventTool.Run(EventName.PanelBase.Open + gameObject.name); StopAllCoroutines(); transform.localScale = Vector3.one; transform.localPosition = Vector3.zero; GetComponent <CanvasGroup>().alpha = 1; StartCoroutine(playEnterAni(() => { EventTool.Run(EventName.PanelBase.OpenFinsh + gameObject.name); }, _enterAni)); }
private void appInitFinsh() { EventTool.Run <string>(EventName.PanelBase.Open, PanelBaseName.ManorUI); }