reg() public static method

public static reg ( IntPtr l ) : void
l System.IntPtr
return void
        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;
        }
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
        public void bindUnity()
        {
            if (!openedSluaLib)
            {
                openSluaLib();
            }

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

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

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

            LuaValueType.reg(L);
        }
Beispiel #13
0
 public void bindUnity()
 {
     LuaSvr.Instance.doBind(L);
     LuaValueType.reg(L);
 }