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


                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);



                {
                    UnityEngine.Vector2 _targetPoint; translator.Get(L, 2, out _targetPoint);
                    float _desiredSpeed = (float)LuaAPI.lua_tonumber(L, 3);
                    float _maxSpeed     = (float)LuaAPI.lua_tonumber(L, 4);

                    gen_to_be_invoked.SetTarget(_targetPoint, _desiredSpeed, _maxSpeed);



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


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



                {
                    UnityEngine.Vector2 _p; translator.Get(L, 2, out _p);
                    float _speed       = (float)LuaAPI.lua_tonumber(L, 3);
                    float _timeHorizon = (float)LuaAPI.lua_tonumber(L, 4);
                    float _agentRadius = (float)LuaAPI.lua_tonumber(L, 5);
                    Pathfinding.RVO.Sampled.Agent _agent = (Pathfinding.RVO.Sampled.Agent)translator.GetObject(L, 6, typeof(Pathfinding.RVO.Sampled.Agent));

                    gen_to_be_invoked.Query(
                        _p,
                        _speed,
                        _timeHorizon,
                        _agentRadius,
                        _agent);



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

                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.PreCalculationCallback = translator.GetDelegate <System.Action>(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Beispiel #4
0
        static int _s_set_Priority(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.Priority = (float)LuaAPI.lua_tonumber(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Beispiel #5
0
        static int _s_set_MaxNeighbours(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.MaxNeighbours = LuaAPI.xlua_tointeger(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Beispiel #6
0
        static int _g_get_NeighbourObstacles(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.NeighbourObstacles);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Beispiel #7
0
        static int _g_get_DebugDraw(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.DebugDraw);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Beispiel #8
0
        static int _g_get_CalculatedTargetPoint(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);
                translator.PushUnityEngineVector2(L, gen_to_be_invoked.CalculatedTargetPoint);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Beispiel #9
0
        static int _s_set_CollidesWith(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);
                Pathfinding.RVO.RVOLayer      gen_value; translator.Get(L, 2, out gen_value);
                gen_to_be_invoked.CollidesWith = gen_value;
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Beispiel #10
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 3 && translator.Assignable <UnityEngine.Vector2>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Vector2 _pos; translator.Get(L, 2, out _pos);
                    float _elevationCoordinate = (float)LuaAPI.lua_tonumber(L, 3);

                    Pathfinding.RVO.Sampled.Agent gen_ret = new Pathfinding.RVO.Sampled.Agent(_pos, _elevationCoordinate);
                    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 Pathfinding.RVO.Sampled.Agent constructor!"));
        }
Beispiel #11
0
        static int _m_CalculateNeighbours(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.CalculateNeighbours(  );



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


                Pathfinding.RVO.Sampled.Agent gen_to_be_invoked = (Pathfinding.RVO.Sampled.Agent)translator.FastGetCSObj(L, 1);



                {
                    UnityEngine.Vector2 _velocity; translator.Get(L, 2, out _velocity);

                    gen_to_be_invoked.ForceSetVelocity(_velocity);



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


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



                {
                    Pathfinding.RVO.Sampled.Agent _agent = (Pathfinding.RVO.Sampled.Agent)translator.GetObject(L, 2, typeof(Pathfinding.RVO.Sampled.Agent));

                    gen_to_be_invoked.Insert(_agent);



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