Beispiel #1
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    PF.AstarSerializer gen_ret = new PF.AstarSerializer();
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <PF.SerializeSettings>(L, 2))
                {
                    PF.SerializeSettings _settings = (PF.SerializeSettings)translator.GetObject(L, 2, typeof(PF.SerializeSettings));

                    PF.AstarSerializer gen_ret = new PF.AstarSerializer(_settings);
                    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 PF.AstarSerializer constructor!"));
        }
        static int _g_get_editorSettings(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

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

                PF.SerializeSettings gen_to_be_invoked = (PF.SerializeSettings)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.nodes = LuaAPI.lua_toboolean(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
        static int _m_SerializeGraphs(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Pathfinding.AstarData gen_to_be_invoked = (Pathfinding.AstarData)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 1)
                {
                    byte[] gen_ret = gen_to_be_invoked.SerializeGraphs(  );
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <PF.SerializeSettings>(L, 2))
                {
                    PF.SerializeSettings _settings = (PF.SerializeSettings)translator.GetObject(L, 2, typeof(PF.SerializeSettings));

                    byte[] gen_ret = gen_to_be_invoked.SerializeGraphs(
                        _settings);
                    LuaAPI.lua_pushstring(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 3 && translator.Assignable <PF.SerializeSettings>(L, 2))
                {
                    PF.SerializeSettings _settings = (PF.SerializeSettings)translator.GetObject(L, 2, typeof(PF.SerializeSettings));
                    uint _checksum;

                    byte[] gen_ret = gen_to_be_invoked.SerializeGraphs(
                        _settings,
                        out _checksum);
                    LuaAPI.lua_pushstring(L, gen_ret);
                    LuaAPI.xlua_pushuint(L, _checksum);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to Pathfinding.AstarData.SerializeGraphs!"));
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    PF.SerializeSettings gen_ret = new PF.SerializeSettings();
                    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 PF.SerializeSettings constructor!"));
        }