Esempio n. 1
0
        static int _g_get_IsFinished(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                KEngine.KAsync gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsFinished);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Esempio n. 2
0
        static int _m_Thread(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                KEngine.KAsync gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <KEngine.KAsync.AsyncThreadDelegate>(L, 2))
                {
                    KEngine.KAsync.AsyncThreadDelegate _threadCalAction = translator.GetDelegate <KEngine.KAsync.AsyncThreadDelegate>(L, 2);

                    KEngine.KAsync gen_ret = gen_to_be_invoked.Thread(_threadCalAction);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <System.Action>(L, 2))
                {
                    System.Action _threadCalAction = translator.GetDelegate <System.Action>(L, 2);

                    KEngine.KAsync gen_ret = gen_to_be_invoked.Thread(_threadCalAction);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <KEngine.KAsync.AsyncThreadDelegateFull>(L, 2) && translator.Assignable <object>(L, 3))
                {
                    KEngine.KAsync.AsyncThreadDelegateFull _threadCalAction = translator.GetDelegate <KEngine.KAsync.AsyncThreadDelegateFull>(L, 2);
                    object _param = translator.GetObject(L, 3, typeof(object));

                    KEngine.KAsync gen_ret = gen_to_be_invoked.Thread(_threadCalAction, _param);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to KEngine.KAsync.Thread!"));
        }
Esempio n. 3
0
        static int _m_Then(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                KEngine.KAsync gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <System.Action>(L, 2))
                {
                    System.Action _callback = translator.GetDelegate <System.Action>(L, 2);

                    KEngine.KAsync gen_ret = gen_to_be_invoked.Then(_callback);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <KEngine.KAsync.AsyncThenDelegate>(L, 2))
                {
                    KEngine.KAsync.AsyncThenDelegate _thenFunc = translator.GetDelegate <KEngine.KAsync.AsyncThenDelegate>(L, 2);

                    KEngine.KAsync gen_ret = gen_to_be_invoked.Then(_thenFunc);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <KEngine.KAsync.AsyncThenDelegateEasy>(L, 2))
                {
                    KEngine.KAsync.AsyncThenDelegateEasy _thenFunc = translator.GetDelegate <KEngine.KAsync.AsyncThenDelegateEasy>(L, 2);

                    KEngine.KAsync gen_ret = gen_to_be_invoked.Then(_thenFunc);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to KEngine.KAsync.Then!"));
        }
Esempio n. 4
0
        static int _m_Start_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 0)
                {
                    KEngine.KAsync gen_ret = KEngine.KAsync.Start(  );
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 1 && translator.Assignable <System.Action>(L, 1))
                {
                    System.Action _callback = translator.GetDelegate <System.Action>(L, 1);

                    KEngine.KAsync gen_ret = KEngine.KAsync.Start(_callback);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 1 && translator.Assignable <KEngine.KAsync.AsyncThenDelegateEasy>(L, 1))
                {
                    KEngine.KAsync.AsyncThenDelegateEasy _callback = translator.GetDelegate <KEngine.KAsync.AsyncThenDelegateEasy>(L, 1);

                    KEngine.KAsync gen_ret = KEngine.KAsync.Start(_callback);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to KEngine.KAsync.Start!"));
        }
        static int _m_WaitFinish(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            KEngine.KAsync __cl_gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);


            try {
                {
                    UnityEngine.Coroutine __cl_gen_ret = __cl_gen_to_be_invoked.WaitFinish(  );
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Esempio n. 6
0
        static int _m_When(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                KEngine.KAsync gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && translator.Assignable <System.Func <bool> >(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    System.Func <bool> _retBool = translator.GetDelegate <System.Func <bool> >(L, 2);
                    float _timeout = (float)LuaAPI.lua_tonumber(L, 3);

                    KEngine.KAsync gen_ret = gen_to_be_invoked.When(_retBool, _timeout);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <System.Func <bool> >(L, 2))
                {
                    System.Func <bool> _retBool = translator.GetDelegate <System.Func <bool> >(L, 2);

                    KEngine.KAsync gen_ret = gen_to_be_invoked.When(_retBool);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to KEngine.KAsync.When!"));
        }
        static int _m__Thread(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            KEngine.KAsync __cl_gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 3 && translator.Assignable <KEngine.KAsync.AsyncThreadDelegateFull>(L, 2) && translator.Assignable <object>(L, 3))
                {
                    KEngine.KAsync.AsyncThreadDelegateFull threadCalAction = translator.GetDelegate <KEngine.KAsync.AsyncThreadDelegateFull>(L, 2);
                    object param = translator.GetObject(L, 3, typeof(object));

                    System.Collections.IEnumerator __cl_gen_ret = __cl_gen_to_be_invoked._Thread(threadCalAction, param);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && translator.Assignable <KEngine.KAsync.AsyncThreadDelegateFull>(L, 2))
                {
                    KEngine.KAsync.AsyncThreadDelegateFull threadCalAction = translator.GetDelegate <KEngine.KAsync.AsyncThreadDelegateFull>(L, 2);

                    System.Collections.IEnumerator __cl_gen_ret = __cl_gen_to_be_invoked._Thread(threadCalAction);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to KEngine.KAsync._Thread!"));
        }
Esempio n. 8
0
        static int _m_WaitForEndOfFrame(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                KEngine.KAsync gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);



                {
                    KEngine.KAsync gen_ret = gen_to_be_invoked.WaitForEndOfFrame(  );
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Esempio n. 9
0
        static int _m_Coroutine(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                KEngine.KAsync gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <System.Collections.IEnumerator>(L, 2))
                {
                    System.Collections.IEnumerator _enumtor = (System.Collections.IEnumerator)translator.GetObject(L, 2, typeof(System.Collections.IEnumerator));

                    KEngine.KAsync gen_ret = gen_to_be_invoked.Coroutine(_enumtor);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <UnityEngine.Coroutine>(L, 2))
                {
                    UnityEngine.Coroutine _co = (UnityEngine.Coroutine)translator.GetObject(L, 2, typeof(UnityEngine.Coroutine));

                    KEngine.KAsync gen_ret = gen_to_be_invoked.Coroutine(_co);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to KEngine.KAsync.Coroutine!"));
        }
        static int _m_WaitForSeconds(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            KEngine.KAsync __cl_gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);


            try {
                {
                    float time = (float)LuaAPI.lua_tonumber(L, 2);

                    KEngine.KAsync __cl_gen_ret = __cl_gen_to_be_invoked.WaitForSeconds(time);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_WaitForFrames(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            KEngine.KAsync __cl_gen_to_be_invoked = (KEngine.KAsync)translator.FastGetCSObj(L, 1);


            try {
                {
                    int frameCount = LuaAPI.xlua_tointeger(L, 2);

                    KEngine.KAsync __cl_gen_ret = __cl_gen_to_be_invoked.WaitForFrames(frameCount);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }