public void openSluaLib() { LuaArray.init(L); LuaVarObject.init(L); LuaDLL.lua_newtable(L); LuaDLL.lua_setglobal(L, DelgateTable); #if !SLUA_STANDALONE LuaTimer.reg(L); LuaCoroutine.reg(L, lgo); #endif //Lua_SLua_ByteArray.reg(L); LuaHelper.reg(L); openedSluaLib = true; }
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; }