private void Awake() { if (_instance == null) { _instance = this; } }
static int set__instance(IntPtr L) { try { LuaFramework.MyPeer arg0 = (LuaFramework.MyPeer)ToLua.CheckObject <LuaFramework.MyPeer>(L, 2); LuaFramework.MyPeer._instance = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int HadDisConnected(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaFramework.MyPeer obj = (LuaFramework.MyPeer)ToLua.CheckObject <LuaFramework.MyPeer>(L, 1); obj.HadDisConnected(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetMsg(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.MyPeer obj = (LuaFramework.MyPeer)ToLua.CheckObject <LuaFramework.MyPeer>(L, 1); byte arg0 = (byte)LuaDLL.luaL_checknumber(L, 2); System.Collections.Generic.Dictionary <byte, object> arg1 = (System.Collections.Generic.Dictionary <byte, object>)ToLua.CheckObject(L, 3, typeof(System.Collections.Generic.Dictionary <byte, object>)); obj.GetMsg(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int CallMethod(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); LuaFramework.MyPeer obj = (LuaFramework.MyPeer)ToLua.CheckObject <LuaFramework.MyPeer>(L, 1); 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)); } }