Beispiel #1
0
    static int SendConnect(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                obj.SendConnect();
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(string), typeof(int)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                int    arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                obj.SendConnect(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.NetworkManager.SendConnect"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #2
0
    static int set_OnReceiveMessage(IntPtr L)
    {
        try
        {
            LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
            EventObject arg0 = null;

            if (LuaDLL.lua_isuserdata(L, 2) != 0)
            {
                arg0 = (EventObject)ToLua.ToObject(L, 2);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "The event 'LuaFramework.NetworkManager.OnReceiveMessage' can only appear on the left hand side of += or -= when used outside of the type 'LuaFramework.NetworkManager'"));
            }

            if (arg0.op == EventOp.Add)
            {
                System.Action <int, LuaFramework.ByteBuffer> ev = (System.Action <int, LuaFramework.ByteBuffer>)arg0.func;
                obj.OnReceiveMessage += ev;
            }
            else if (arg0.op == EventOp.Sub)
            {
                System.Action <int, LuaFramework.ByteBuffer> ev = (System.Action <int, LuaFramework.ByteBuffer>)arg0.func;
                obj.OnReceiveMessage -= ev;
            }

            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #3
0
    static int SendTcpServerMessage(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                LuaFramework.NetworkManager obj  = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                Protocols.ProtoBody         arg0 = (Protocols.ProtoBody)ToLua.CheckObject <Protocols.ProtoBody>(L, 2);
                obj.SendTcpServerMessage(arg0);
                return(0);
            }
            else if (count == 3)
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                ushort arg0 = (ushort)LuaDLL.luaL_checknumber(L, 2);
                byte[] arg1 = ToLua.CheckByteBuffer(L, 3);
                obj.SendTcpServerMessage(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.NetworkManager.SendTcpServerMessage"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #4
0
    static int SendMessage(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.SendMessage(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <string, UnityEngine.SendMessageOptions>(L, 2))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <LuaInterface.LuaByteBuffer, int>(L, 2))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                LuaByteBuffer arg0 = new LuaByteBuffer(ToLua.CheckByteBuffer(L, 2));
                int           arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <string, object>(L, 2))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.CheckObject(L, 4, typeof(UnityEngine.SendMessageOptions));
                obj.SendMessage(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.NetworkManager.SendMessage"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int SendMessage(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(string)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                obj.SendMessage(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(LuaFramework.ByteBuffer)))
            {
                LuaFramework.NetworkManager obj  = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                LuaFramework.ByteBuffer     arg0 = (LuaFramework.ByteBuffer)ToLua.ToObject(L, 2);
                obj.SendMessage(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(string), typeof(UnityEngine.SendMessageOptions)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(string), typeof(object)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
                obj.SendMessage(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.NetworkManager.SendMessage"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int OnInit(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         obj.OnInit();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #7
0
 static int GetNetManager(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         LuaFramework.NetworkManager o = LuaFramework.LuaHelper.GetNetManager();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #8
0
 static int Unload(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
         obj.Unload();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #9
0
 static int SetPowerSaveMode(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
         bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
         obj.SetPowerSaveMode(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #10
0
 static int KickOut(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         obj.KickOut(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #11
0
 static int RegisterLuaSocket(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         LuaFunction arg0 = ToLua.CheckLuaFunction(L, 2);
         obj.RegisterLuaSocket(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #12
0
 static int OnServerListenerCallback(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         JSONObject arg0 = (JSONObject)ToLua.CheckObject <JSONObject>(L, 2);
         obj.OnServerListenerCallback(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #13
0
    static int CreateInstance(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 0);
            LuaFramework.NetworkManager o = MonoSingleton <LuaFramework.NetworkManager> .CreateInstance();

            ToLua.Push(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #14
0
 static int SetLuaTable(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
         LuaTable arg0 = ToLua.CheckLuaTable(L, 2);
         obj.SetLuaTable(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SendMsg(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         obj.SendMsg(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #16
0
    static int Emit(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.Emit(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <JSONObject>(L, 3))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string     arg0 = ToLua.CheckString(L, 2);
                JSONObject arg1 = (JSONObject)ToLua.ToObject(L, 3);
                obj.Emit(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <System.Action <JSONObject> >(L, 3))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                System.Action <JSONObject> arg1 = (System.Action <JSONObject>)ToLua.ToObject(L, 3);
                obj.Emit(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                string arg1 = ToLua.CheckString(L, 3);
                System.Action <JSONObject> arg2 = (System.Action <JSONObject>)ToLua.CheckDelegate <System.Action <JSONObject> >(L, 4);
                obj.Emit(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.NetworkManager.Emit"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #17
0
 static int CallMethod(IntPtr L)
 {
     try
     {
         int count = LuaDLL.lua_gettop(L);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
         string   arg0 = ToLua.CheckString(L, 2);
         object[] arg1 = ToLua.ToParamsObject(L, 3, count - 2);
         obj.CallMethod(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #18
0
 static int SendConnect(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
         string arg0 = ToLua.CheckString(L, 2);
         int    arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         obj.SendConnect(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #19
0
 static int _Register(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         System.Action <SocketModel> arg1 = (System.Action <SocketModel>)ToLua.CheckDelegate <System.Action <SocketModel> >(L, 3);
         obj.Register(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #20
0
 static int OnSocketData(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         LuaFramework.ByteBuffer arg1 = (LuaFramework.ByteBuffer)ToLua.CheckObject(L, 3, typeof(LuaFramework.ByteBuffer));
         obj.OnSocketData(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #21
0
 static int On(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         System.Action <SocketIO.SocketIOEvent> arg1 = (System.Action <SocketIO.SocketIOEvent>)ToLua.CheckDelegate <System.Action <SocketIO.SocketIOEvent> >(L, 3);
         obj.On(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #22
0
 static int OnSkillObjectX(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         ushort arg0 = (ushort)LuaDLL.luaL_checknumber(L, 2);
         System.IO.MemoryStream arg1 = (System.IO.MemoryStream)ToLua.CheckObject <System.IO.MemoryStream>(L, 3);
         obj.OnSkillObjectX(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #23
0
 static int Connected(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         object arg0 = ToLua.ToVarObject(L, 2);
         NFSDK.ConnectedEventArgs arg1 = (NFSDK.ConnectedEventArgs)ToLua.CheckObject <NFSDK.ConnectedEventArgs>(L, 3);
         obj.Connected(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #24
0
 static int SendMsg(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         int           arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         LuaByteBuffer arg1 = new LuaByteBuffer(ToLua.CheckByteBuffer(L, 3));
         obj.SendMsg(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #25
0
 static int AddReceiveCallBack(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         ushort arg0 = (ushort)LuaDLL.luaL_checknumber(L, 2);
         NFSDK.NFCMessageDispatcher.MessageHandler arg1 = (NFSDK.NFCMessageDispatcher.MessageHandler)ToLua.CheckDelegate <NFSDK.NFCMessageDispatcher.MessageHandler>(L, 3);
         obj.AddReceiveCallBack(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #26
0
 static int ConnectServer(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         ushort arg1 = (ushort)LuaDLL.luaL_checknumber(L, 3);
         obj.ConnectServer(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #27
0
 static int RegisterCallBack(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj  = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         Protocols.ProtoID           arg0 = (Protocols.ProtoID)ToLua.CheckObject <Protocols.ProtoID>(L, 2);
         NetworkEventHandler         arg1 = (NetworkEventHandler)ToLua.CheckDelegate <NetworkEventHandler>(L, 3);
         obj.RegisterCallBack(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #28
0
 static int RegisterShortCallBack(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
         ushort arg0 = (ushort)LuaDLL.luaL_checknumber(L, 2);
         NetworkEventHandler arg1 = (NetworkEventHandler)ToLua.CheckDelegate <NetworkEventHandler>(L, 3);
         obj.RegisterShortCallBack(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #29
0
 static int AddEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
         int         arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3);
         object[]    arg2 = ToLua.CheckObjectArray(L, 4);
         obj.AddEvent(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #30
0
    static int set_sid(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)o;
            string arg0 = ToLua.CheckString(L, 2);
            obj.sid = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index sid on a nil value"));
        }
    }