private static int RegisterIngoreStatic(IntPtr l) { string className = lua.ToString(-1); LuaRegister.RegisterIngoreStatic(className); return(0); }
static int applicationIsPlaying(IntPtr L) { try { ToLua.CheckArgsCount(L, 0); bool o = LuaRegister.applicationIsPlaying(); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static void RegisterToLua(LuaState lua) { LuaRegisterWrapper.lua = lua; string[] funcList = new string[] { "RegisterClass", "RegisterIngoreStatic", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { RegisterClass, RegisterIngoreStatic, }; LuaRegister.RegisterToLua(lua, "RegisterWrapper", funcList, funcDeList); }
public static void RegisterToLua(LuaState l) { lua = l; string[] funcList = new string[] { "AddTimer", "RemoveTimer", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { AddTimer, RemoveTimer, }; LuaRegister.RegisterToLua(l, "LuaTimerWheel", funcList, funcDeList); }
static int set_type(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaRegister obj = (LuaRegister)o; int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.type = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index type on a nil value")); } }
static int get_id(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); LuaRegister obj = (LuaRegister)o; int ret = obj.id; LuaDLL.lua_pushinteger(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index id on a nil value")); } }
public static void RegisterToLua(LuaState l) { lua = l; string[] funcList = new string[] { "Log", "LogError", "LogWarning", }; LuaAPI.lua_CFunction[] funcDeList = new LuaAPI.lua_CFunction[] { Log, LogError, LogWarning, }; LuaRegister.RegisterToLua(l, "DebugLogger", funcList, funcDeList); }
void doinit(IntPtr L, LuaSvrFlag flag) { #if !SLUA_STANDALONE LuaTimer.reg(L); #if UNITY_EDITOR if (UnityEditor.EditorApplication.isPlaying) #endif LuaCoroutine.reg(L, lgo); #endif LuaHelper.reg(L); LuaValueType.reg(L); LuaRegister.reg(L); if ((flag & LuaSvrFlag.LSF_EXTLIB) != 0) { LuaDLL.luaS_openextlibs(L); } if ((flag & LuaSvrFlag.LSF_3RDDLL) != 0) { Lua3rdDLL.open(L); } #if !SLUA_STANDALONE #if UNITY_EDITOR if (UnityEditor.EditorApplication.isPlaying) { #endif lgo.state = luaState; lgo.onUpdate = this.tick; lgo.init(); #if UNITY_EDITOR } #endif #endif inited = true; }
public void unregister(LuaRegister v) { engine.Call("unregister", v); }
void Start() { mLuaState.DoFile("lua/preload/regist.lua"); LuaRegister.Register(mLuaState.L); mLuaState.DoFile("lua/main.lua"); }