Inheritance: LuaObject
Esempio n. 1
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;
        }
Esempio n. 2
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);
            LuaValueType.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;
        }
Esempio n. 3
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;
        }
Esempio n. 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;
        }
Esempio n. 5
0
        protected void doinit(LuaState L)
        {
            L.openSluaLib();
            LuaValueType.reg(L.L);
            L.openExtLib();
            Lua3rdDLL.open(L.L);

            inited = true;
        }
Esempio n. 6
0
        public void bindUnity()
        {
            if (!openedSluaLib)
            {
                openSluaLib();
            }

            LuaSvr.doBind(L);
            LuaValueType.reg(L);
        }
Esempio n. 7
0
        public IEnumerator bindUnity(Action <int> _tick, Action complete)
        {
            if (!openedSluaLib)
            {
                openSluaLib();
            }

            yield return(LuaSvr.doBind(L, _tick, complete));

            LuaValueType.reg(L);
        }
Esempio n. 8
0
 static int init(IntPtr L)
 {
     LuaObject.init(L);
     bindAll(L);
     LuaTimer.reg(L);
     LuaCoroutine.reg(L, lgo);
     Helper.reg(L);
     LuaValueType.reg(L);
     SLuaDebug.reg(L);
     LuaDLL.luaS_openextlibs(L);
     return(0);
 }
Esempio n. 9
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);
            }
        }
Esempio n. 10
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);
            }
        }
Esempio n. 11
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;
        }
Esempio n. 12
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;
        }
Esempio n. 13
0
        public IEnumerator bindUnity(Action <int> _tick, Action complete)
        {
            yield return(LuaSvr.doBind(L, _tick, complete));

            LuaValueType.reg(L);
        }
Esempio n. 14
0
        public IEnumerator BindUnity(Action <int> tickAction, Action onComplete)
        {
            yield return(LuaSvr.DoBind(StatePointer, tickAction, onComplete));

            LuaValueType.Register(StatePointer);
        }
Esempio n. 15
0
 public void BindUnity()
 {
     LuaSvr.DoBind(StatePointer);
     LuaValueType.Register(StatePointer);
 }
Esempio n. 16
0
 public void bindUnity()
 {
     LuaSvr.Instance.doBind(L);
     LuaValueType.reg(L);
 }