| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- //this source code was auto-generated by tolua#, do not modify it
- using System;
- using LuaInterface;
- public class LuaMgrWrap
- {
- public static void Register(LuaState L)
- {
- L.BeginClass(typeof(LuaMgr), typeof(SingletonMono<LuaMgr>));
- L.RegFunction("InitMgr", InitMgr);
- L.RegFunction("Clear", Clear);
- L.RegFunction("CallMain", CallMain);
- L.RegFunction("StartMain", StartMain);
- L.RegFunction("StartMainPrecent", StartMainPrecent);
- L.RegFunction("StartMainComplete", StartMainComplete);
- L.RegFunction("EnterLogin", EnterLogin);
- L.RegFunction("LuaGC", LuaGC);
- L.RegFunction("Destroy", Destroy);
- L.RegFunction("GetMainState", GetMainState);
- L.RegFunction("GetLooper", GetLooper);
- L.RegFunction("GetPbFiles", GetPbFiles);
- L.RegFunction("AddLuaSearchPath", AddLuaSearchPath);
- L.RegFunction("GetLuaTextAsset", GetLuaTextAsset);
- L.RegFunction("__eq", op_Equality);
- L.RegFunction("__tostring", ToLua.op_ToString);
- L.RegVar("luaState", get_luaState, set_luaState);
- L.EndClass();
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int InitMgr(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- obj.InitMgr();
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Clear(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- obj.Clear();
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int CallMain(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- obj.CallMain();
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int StartMain(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- obj.StartMain();
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int StartMainPrecent(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
- obj.StartMainPrecent(arg0);
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int StartMainComplete(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- obj.StartMainComplete();
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int EnterLogin(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
- obj.EnterLogin(arg0);
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int LuaGC(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- obj.LuaGC();
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Destroy(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- obj.Destroy();
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetMainState(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 0);
- LuaInterface.LuaState o = LuaMgr.GetMainState();
- ToLua.PushObject(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetLooper(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- LuaLooper o = obj.GetLooper();
- ToLua.Push(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetPbFiles(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- System.Collections.Generic.List<LuaInterface.LuaByteBuffer> o = obj.GetPbFiles();
- ToLua.PushSealed(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int AddLuaSearchPath(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- string arg0 = ToLua.CheckString(L, 2);
- obj.AddLuaSearchPath(arg0);
- return 0;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetLuaTextAsset(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- LuaMgr obj = (LuaMgr)ToLua.CheckObject<LuaMgr>(L, 1);
- string arg0 = ToLua.CheckString(L, 2);
- byte[] o = obj.GetLuaTextAsset(arg0);
- ToLua.Push(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int op_Equality(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
- UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
- bool o = arg0 == arg1;
- LuaDLL.lua_pushboolean(L, o);
- return 1;
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_luaState(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- LuaMgr obj = (LuaMgr)o;
- LuaInterface.LuaState ret = obj.luaState;
- ToLua.PushObject(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index luaState on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_luaState(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- LuaMgr obj = (LuaMgr)o;
- LuaInterface.LuaState arg0 = (LuaInterface.LuaState)ToLua.CheckObject<LuaInterface.LuaState>(L, 2);
- obj.luaState = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index luaState on a nil value");
- }
- }
- }
|