Example #1
0
        static int _m_TryImport(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            KSFramework.LuaModule __cl_gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);


            try {
                {
                    string fileName = LuaAPI.lua_tostring(L, 2);
                    object result;

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.TryImport(fileName, out result);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);
                    translator.PushAny(L, result);



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

            try {
                KSFramework.LuaModule __cl_gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, __cl_gen_to_be_invoked.InitProgress);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
        static int _g_get_IsInited(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                KSFramework.LuaModule gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsInited);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Example #4
0
        static int _m_ClearAllCache(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            KSFramework.LuaModule __cl_gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);


            try {
                {
                    __cl_gen_to_be_invoked.ClearAllCache(  );



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


            KSFramework.LuaModule __cl_gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    byte[] scriptCode = LuaAPI.lua_tobytes(L, 2);

                    object __cl_gen_ret = __cl_gen_to_be_invoked.ExecuteScript(scriptCode);
                    translator.PushAny(L, __cl_gen_ret);



                    return(1);
                }
                if (__gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
                {
                    byte[] scriptCode = LuaAPI.lua_tobytes(L, 2);
                    object ret;

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.ExecuteScript(scriptCode, out ret);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);
                    translator.PushAny(L, ret);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to KSFramework.LuaModule.ExecuteScript!"));
        }
Example #6
0
        static int _m_Init(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            KSFramework.LuaModule __cl_gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);


            try {
                {
                    System.Collections.IEnumerator __cl_gen_ret = __cl_gen_to_be_invoked.Init(  );
                    translator.Push(L, __cl_gen_ret);



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


            KSFramework.LuaModule __cl_gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);


            try {
                {
                    string uiLuaPath = LuaAPI.lua_tostring(L, 2);

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.ClearCache(uiLuaPath);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);



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


            KSFramework.LuaModule __cl_gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);


            try {
                {
                    string path = LuaAPI.lua_tostring(L, 2);

                    object __cl_gen_ret = __cl_gen_to_be_invoked.CallScript(path);
                    translator.PushAny(L, __cl_gen_ret);



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


                KSFramework.LuaModule gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);



                {
                    string _fileName = LuaAPI.lua_tostring(L, 2);

                    object gen_ret = gen_to_be_invoked.Import(_fileName);
                    translator.PushAny(L, gen_ret);



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


                KSFramework.LuaModule gen_to_be_invoked = (KSFramework.LuaModule)translator.FastGetCSObj(L, 1);



                {
                    string _scriptRelativePath = LuaAPI.lua_tostring(L, 2);

                    bool gen_ret = gen_to_be_invoked.HasScript(_scriptRelativePath);
                    LuaAPI.lua_pushboolean(L, gen_ret);



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