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

                PF.BinaryHeap gen_to_be_invoked = (PF.BinaryHeap)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.growthFactor = (float)LuaAPI.lua_tonumber(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Example #2
0
        static int _g_get_numberOfItems(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                PF.BinaryHeap gen_to_be_invoked = (PF.BinaryHeap)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.numberOfItems);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Example #3
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    int _capacity = LuaAPI.xlua_tointeger(L, 2);

                    PF.BinaryHeap gen_ret = new PF.BinaryHeap(_capacity);
                    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.BinaryHeap constructor!"));
        }
Example #4
0
        static int _m_Clear(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                PF.BinaryHeap gen_to_be_invoked = (PF.BinaryHeap)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Clear(  );



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


                PF.BinaryHeap gen_to_be_invoked = (PF.BinaryHeap)translator.FastGetCSObj(L, 1);



                {
                    PF.PathNode gen_ret = gen_to_be_invoked.Remove(  );
                    translator.Push(L, gen_ret);



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


                PF.BinaryHeap gen_to_be_invoked = (PF.BinaryHeap)translator.FastGetCSObj(L, 1);



                {
                    PF.PathNode _node = (PF.PathNode)translator.GetObject(L, 2, typeof(PF.PathNode));

                    gen_to_be_invoked.Add(_node);



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