internal static void HandleNodeMessage(NodeMessage msg, int handle, uint session) { if (s_Inited && msg != null) { //LogSys.Log(LOG_TYPE.DEBUG, "Handle Json Message:{0}={1}", msg.m_ID, msg.GetType().Name); NodeMessageHandlerInfo info = s_MessageHandlers [(int)msg.m_ID]; if (info != null && info.m_Handler != null) { info.m_Handler(msg, handle, session); } } }
internal static void Init(int worldId) { if (!s_Inited) { s_WorldId = worldId; s_MessageHandlers = new NodeMessageHandlerInfo[(int)LobbyMessageDefine.MaxNum]; for (int i = 0; i < (int)LobbyMessageDefine.MaxNum; ++i) { s_MessageHandlers[i] = new NodeMessageHandlerInfo(); } s_Inited = true; } }