Beispiel #1
0
        protected void doinit(IntPtr L, LuaSvrFlag flag)
        {
#if !SLUA_STANDALONE
            LuaTimer.reg(L);
            if (!SLuaSetting.IsEditor || SLuaSetting.IsPlaying)
            {
                LuaCoroutine.reg(L, lgo);
            }
#endif
            Helper.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 (!SLuaSetting.IsEditor || SLuaSetting.IsPlaying)
            {
                lgo.state    = luaState;
                lgo.onUpdate = this.tick;
                lgo.init();
            }
#endif

            inited = true;
        }
Beispiel #2
0
        protected void doinit(LuaState L, LuaSvrFlag flag)
        {
            L.openSluaLib();
            LuaValueType.reg(L.L);
            if ((flag & LuaSvrFlag.LSF_EXTLIB) != 0)
            {
                L.openExtLib();
            }

            if ((flag & LuaSvrFlag.LSF_3RDDLL) != 0)
            {
                Lua3rdDLL.open(L.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;
        }
Beispiel #3
0
        void doinit(IntPtr L, LuaSvrFlag flag, bool useTick)
        {
            if (!editor)
            {
#if !SLUA_STANDALONE
                LuaTimer.reg(L);
                LuaCoroutine.reg(L, lgo);
#endif
                Helper.reg(L);
                LuaValueType.reg(L);
            }

            if ((flag & LuaSvrFlag.LSF_EXTLIB) != 0)
            {
                LuaDLL.luaS_openextlibs(L);
            }
            if ((flag & LuaSvrFlag.LSF_3RDDLL) != 0)
            {
                Lua3rdDLL.open(L);
            }
            if (!editor)
            {
#if !SLUA_STANDALONE
                lgo.state = luaState;
                if (useTick)
                {
                    lgo.onUpdate = this.tick;
                }
                lgo.init();
#endif
            }
            inited = true;
        }
Beispiel #4
0
        void doinit(IntPtr L, LuaSvrFlag flag)
        {
            LuaTimer.reg(L);
            LuaCoroutine.reg(L, lgo);
            Helper.reg(L);
            LuaValueType.reg(L);
            if ((flag & LuaSvrFlag.LSF_DEBUG) != 0)
            {
                SLuaDebug.reg(L);
            }
            if ((flag & LuaSvrFlag.LSF_EXTLIB) != 0)
            {
                LuaDLL.luaS_openextlibs(L);
            }
            if ((flag & LuaSvrFlag.LSF_3RDDLL) != 0)
            {
                Lua3rdDLL.open(L);
            }

            lgo.state    = luaState;
            lgo.onUpdate = this.tick;
            lgo.init();

            inited = true;
        }
Beispiel #5
0
        protected void doinit(LuaState L)
        {
            L.openSluaLib();
            LuaValueType.reg(L.L);
            L.openExtLib();
            Lua3rdDLL.open(L.L);

            inited = true;
        }
Beispiel #6
0
        protected void doinit(LuaState L, LuaSvrFlag flag)
        {
            L.openSluaLib();
            if ((flag & LuaSvrFlag.LSF_EXTLIB) != 0)
            {
                L.openExtLib();
            }

            if ((flag & LuaSvrFlag.LSF_3RDDLL) != 0)
            {
                Lua3rdDLL.open(L.L);
            }
        }
Beispiel #7
0
        protected void DoInit(LuaState state, LuaSvrFlag flag)
        {
            state.OpenLibrary();
            LuaValueType.Register(state.StatePointer);

            if ((flag & LuaSvrFlag.LSF_EXTLIB) != 0)
            {
                state.OpenExternalLibrary();
            }

            if ((flag & LuaSvrFlag.LSF_3RDDLL) != 0)
            {
                Lua3rdDLL.Open(state.StatePointer);
            }
        }
Beispiel #8
0
        void doinit(IntPtr L)
        {
            LuaTimer.reg(L);
            LuaCoroutine.reg(L, lgo);
            Helper.reg(L);
            LuaValueType.reg(L);
            SLuaDebug.reg(L);
            LuaDLL.luaS_openextlibs(L);
            Lua3rdDLL.open(L);

            lgo.state    = luaState;
            lgo.onUpdate = this.tick;
            lgo.init();

            inited = true;
        }
Beispiel #9
0
        protected 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
            Lua_SLua_ByteArray.reg(L);
            Helper.reg(L);
            LuaValueType.reg(L);
            if ((flag & LuaSvrFlag.LSF_EXTLIB) != 0)
            {
                LuaDLL.luaS_openextlibs(L);
                LuaSocketMini.reg(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;
        }