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

            inited = true;
        }
Exemple #6
0
        public void bindUnity()
        {
            if (!openedSluaLib)
            {
                openSluaLib();
            }

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

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

            LuaValueType.reg(L);
        }
Exemple #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);
 }
Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #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;
        }
Exemple #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;
        }
Exemple #13
0
        public IEnumerator bindUnity(Action <int> _tick, Action complete)
        {
            yield return(LuaSvr.doBind(L, _tick, complete));

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

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