// 更新 public void OnUpdateConnect() { while (m_QueMsgReceive.IsEmpty() == false) { System.Object refObj = null; if (m_QueMsgReceive.Pop(ref refObj) == false) { break; } if (refObj == null) { continue; } Byte[] receByteArray = refObj as Byte[]; if (receByteArray == null) { BTDebug.Warning("Receive Data Not Packed as Byte Array", "NET"); continue; } if (m_HandleOnReceiveMsg != null) { m_HandleOnReceiveMsg(receByteArray); } } }
/// <summary> /// 帧更新 /// </summary> public void Update() { while (m_ListenedEvent.IsEmpty() == false) { System.Object objInfo = null; if (m_ListenedEvent.Pop(ref objInfo) == false || objInfo == null) { continue; } CEventInfo info = objInfo as CEventInfo; if (info == null) { continue; } UInt32 uEventId = info.GetEventId(); System.Object objParam = info.GetEventParam(); m_EventInfoPool.GiveBackObject(info); CHandleInfo handleInfo = null; if (m_EventActionList.QuickFind(uEventId, ref handleInfo) == false || handleInfo == null) { continue; } bool bTriggerRet = handleInfo.TriggerHandle(objParam); if (bTriggerRet == false) { BTDebug.Warning(string.Format("Trigger Event:{0} With Param:{2} Failed", uEventId, objParam), "ACTION"); } } }