Beispiel #1
0
        static int _m_DispachNetMsg2Lua(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                LuaManager gen_to_be_invoked = (LuaManager)translator.FastGetCSObj(L, 1);



                {
                    int    _msgType  = LuaAPI.xlua_tointeger(L, 2);
                    byte[] _msgBytes = LuaAPI.lua_tobytes(L, 3);

                    gen_to_be_invoked.DispachNetMsg2Lua(_msgType, _msgBytes);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Beispiel #2
0
 //网络协议,要转发到LUA执行的
 public void OnReceiveData(int msgID, byte[] msgBytes)
 {
     LuaManager.DispachNetMsg2Lua(msgID, msgBytes);
 }