Example #1
0
 static int BadNetCondition(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         MyFrameWork.NetworkManager obj = (MyFrameWork.NetworkManager)ToLua.CheckObject(L, 1, typeof(MyFrameWork.NetworkManager));
         obj.BadNetCondition();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #2
0
 static int GetNetManager(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         MyFrameWork.NetworkManager o = MyFrameWork.LuaHelper.GetNetManager();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #3
0
 static int StopHeartBeat(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         MyFrameWork.NetworkManager obj  = (MyFrameWork.NetworkManager)ToLua.CheckObject(L, 1, typeof(MyFrameWork.NetworkManager));
         UnityEngine.GameObject     arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.GameObject));
         obj.StopHeartBeat(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #4
0
 static int SendMessage(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         MyFrameWork.NetworkManager obj  = (MyFrameWork.NetworkManager)ToLua.CheckObject(L, 1, typeof(MyFrameWork.NetworkManager));
         MyFrameWork.ByteBuffer     arg0 = (MyFrameWork.ByteBuffer)ToLua.CheckObject(L, 2, typeof(MyFrameWork.ByteBuffer));
         obj.SendMessage(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #5
0
 static int SetReConnect(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         MyFrameWork.NetworkManager obj = (MyFrameWork.NetworkManager)ToLua.CheckObject(L, 1, typeof(MyFrameWork.NetworkManager));
         bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
         obj.SetReConnect(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #6
0
 static int Execute(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         MyFrameWork.NetworkManager obj = (MyFrameWork.NetworkManager)ToLua.CheckObject(L, 1, typeof(MyFrameWork.NetworkManager));
         object arg0 = ToLua.ToVarObject(L, 2);
         obj.Execute(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #7
0
 static int CallMethod(IntPtr L)
 {
     try
     {
         int count = LuaDLL.lua_gettop(L);
         MyFrameWork.NetworkManager obj = (MyFrameWork.NetworkManager)ToLua.CheckObject(L, 1, typeof(MyFrameWork.NetworkManager));
         string   arg0 = ToLua.CheckString(L, 2);
         object[] arg1 = ToLua.ToParamsObject(L, 3, count - 2);
         object[] o    = obj.CallMethod(arg0, arg1);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }