static int _g_get_cost(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PF.PathNode gen_to_be_invoked = (PF.PathNode)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushuint(L, gen_to_be_invoked.cost); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(1); }
static int _s_set_heapIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PF.PathNode gen_to_be_invoked = (PF.PathNode)translator.FastGetCSObj(L, 1); gen_to_be_invoked.heapIndex = (ushort)LuaAPI.xlua_tointeger(L, 2); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int _s_set_parent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PF.PathNode gen_to_be_invoked = (PF.PathNode)translator.FastGetCSObj(L, 1); gen_to_be_invoked.parent = (PF.PathNode)translator.GetObject(L, 2, typeof(PF.PathNode)); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 1) { PF.PathNode gen_ret = new PF.PathNode(); 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.PathNode constructor!")); }
static int _m_GetPathNode(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PF.PathHandler gen_to_be_invoked = (PF.PathHandler)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _nodeIndex = LuaAPI.xlua_tointeger(L, 2); PF.PathNode gen_ret = gen_to_be_invoked.GetPathNode( _nodeIndex); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 2 && translator.Assignable <PF.GraphNode>(L, 2)) { PF.GraphNode _node = (PF.GraphNode)translator.GetObject(L, 2, typeof(PF.GraphNode)); PF.PathNode gen_ret = gen_to_be_invoked.GetPathNode( _node); 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.PathHandler.GetPathNode!")); }
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)); } }
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)); } }
static int _m_TargetFound(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PF.EndingConditionProximity gen_to_be_invoked = (PF.EndingConditionProximity)translator.FastGetCSObj(L, 1); { PF.PathNode _node = (PF.PathNode)translator.GetObject(L, 2, typeof(PF.PathNode)); bool gen_ret = gen_to_be_invoked.TargetFound(_node); LuaAPI.lua_pushboolean(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }