コード例 #1
0
    static int WaitForCondition(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 5);
            Lit.Unity.LitBehaviour obj  = (Lit.Unity.LitBehaviour)ToLua.CheckObject(L, 1, typeof(Lit.Unity.LitBehaviour));
            Lit.Unity._D_OuterBool arg0 = null;
            LuaTypes funcType2          = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (Lit.Unity._D_OuterBool)ToLua.CheckObject(L, 2, typeof(Lit.Unity._D_OuterBool));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(Lit.Unity._D_OuterBool), func) as Lit.Unity._D_OuterBool;
            }

            Lit.Unity._D_Void arg1      = null;
            LuaTypes          funcType3 = LuaDLL.lua_type(L, 3);

            if (funcType3 != LuaTypes.LUA_TFUNCTION)
            {
                arg1 = (Lit.Unity._D_Void)ToLua.CheckObject(L, 3, typeof(Lit.Unity._D_Void));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 3);
                arg1 = DelegateFactory.CreateDelegate(typeof(Lit.Unity._D_Void), func) as Lit.Unity._D_Void;
            }

            float arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
            float arg3 = (float)LuaDLL.luaL_checknumber(L, 5);
            UnityEngine.Coroutine o = obj.WaitForCondition(arg0, arg1, arg2, arg3);
            ToLua.PushObject(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #2
0
    static int _RepeatEveryFrame(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitBehaviour), typeof(int), typeof(Lit.Unity._D_Void)))
            {
                Lit.Unity.LitBehaviour obj = (Lit.Unity.LitBehaviour)ToLua.ToObject(L, 1);
                int arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                Lit.Unity._D_Void arg1      = null;
                LuaTypes          funcType3 = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (Lit.Unity._D_Void)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(Lit.Unity._D_Void), func) as Lit.Unity._D_Void;
                }

                System.Collections.IEnumerator o = obj._RepeatEveryFrame(arg0, arg1);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitBehaviour), typeof(int), typeof(System.Action <int>), typeof(int)))
            {
                Lit.Unity.LitBehaviour obj = (Lit.Unity.LitBehaviour)ToLua.ToObject(L, 1);
                int arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                System.Action <int> arg1      = null;
                LuaTypes            funcType3 = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (System.Action <int>)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(System.Action <int>), func) as System.Action <int>;
                }

                int arg2 = (int)LuaDLL.lua_tonumber(L, 4);
                System.Collections.IEnumerator o = obj._RepeatEveryFrame(arg0, arg1, arg2);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitBehaviour), typeof(int), typeof(System.Action), typeof(int)))
            {
                Lit.Unity.LitBehaviour obj = (Lit.Unity.LitBehaviour)ToLua.ToObject(L, 1);
                int           arg0         = (int)LuaDLL.lua_tonumber(L, 2);
                System.Action arg1         = null;
                LuaTypes      funcType3    = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (System.Action)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(System.Action), func) as System.Action;
                }

                int arg2 = (int)LuaDLL.lua_tonumber(L, 4);
                System.Collections.IEnumerator o = obj._RepeatEveryFrame(arg0, arg1, arg2);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitBehaviour), typeof(int), typeof(Lit.Unity._D_Void), typeof(Lit.Unity._D_OuterBool)))
            {
                Lit.Unity.LitBehaviour obj = (Lit.Unity.LitBehaviour)ToLua.ToObject(L, 1);
                int arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                Lit.Unity._D_Void arg1      = null;
                LuaTypes          funcType3 = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (Lit.Unity._D_Void)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(Lit.Unity._D_Void), func) as Lit.Unity._D_Void;
                }

                Lit.Unity._D_OuterBool arg2 = null;
                LuaTypes funcType4          = LuaDLL.lua_type(L, 4);

                if (funcType4 != LuaTypes.LUA_TFUNCTION)
                {
                    arg2 = (Lit.Unity._D_OuterBool)ToLua.ToObject(L, 4);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 4);
                    arg2 = DelegateFactory.CreateDelegate(typeof(Lit.Unity._D_OuterBool), func) as Lit.Unity._D_OuterBool;
                }

                System.Collections.IEnumerator o = obj._RepeatEveryFrame(arg0, arg1, arg2);
                ToLua.Push(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Lit.Unity.LitBehaviour._RepeatEveryFrame"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #3
0
    static int WaitFor(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitBehaviour), typeof(Lit.Unity._D_OuterBool), typeof(Lit.Unity._D_Void)))
            {
                Lit.Unity.LitBehaviour obj  = (Lit.Unity.LitBehaviour)ToLua.ToObject(L, 1);
                Lit.Unity._D_OuterBool arg0 = null;
                LuaTypes funcType2          = LuaDLL.lua_type(L, 2);

                if (funcType2 != LuaTypes.LUA_TFUNCTION)
                {
                    arg0 = (Lit.Unity._D_OuterBool)ToLua.ToObject(L, 2);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 2);
                    arg0 = DelegateFactory.CreateDelegate(typeof(Lit.Unity._D_OuterBool), func) as Lit.Unity._D_OuterBool;
                }

                Lit.Unity._D_Void arg1      = null;
                LuaTypes          funcType3 = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (Lit.Unity._D_Void)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(Lit.Unity._D_Void), func) as Lit.Unity._D_Void;
                }

                UnityEngine.Coroutine o = obj.WaitFor(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitBehaviour), typeof(float), typeof(Lit.Unity._D_Void)))
            {
                Lit.Unity.LitBehaviour obj  = (Lit.Unity.LitBehaviour)ToLua.ToObject(L, 1);
                float             arg0      = (float)LuaDLL.lua_tonumber(L, 2);
                Lit.Unity._D_Void arg1      = null;
                LuaTypes          funcType3 = LuaDLL.lua_type(L, 3);

                if (funcType3 != LuaTypes.LUA_TFUNCTION)
                {
                    arg1 = (Lit.Unity._D_Void)ToLua.ToObject(L, 3);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 3);
                    arg1 = DelegateFactory.CreateDelegate(typeof(Lit.Unity._D_Void), func) as Lit.Unity._D_Void;
                }

                UnityEngine.Coroutine o = obj.WaitFor(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Lit.Unity.LitBehaviour.WaitFor"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }