Example #1
0
 void OnLuaDispatch(int msgId, byte[] byteArray)
 {
     if (mLuaTable == null)
     {
         mLuaTable = Util.GetFunction("Network", "OnSocket");
     }
     if (byteArray != null)
     {
         mLuaTable.Call(msgId, new LuaByteBuffer(byteArray));
     }
     else
     {
         mLuaTable.Call(msgId);
     }
 }
Example #2
0
        /// <summary>
        /// 初始化游戏管理器
        /// </summary>
        void Awake()
        {
            Init();

            LuaEventHandle = Util.GetFunction("PgEventDispatch", "DoEvent");
        }