Пример #1
0
        static int _m_Move(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    UnityEngine.Vector3 _deltaPosition;translator.Get(L, 2, out _deltaPosition);
                    
                    gen_to_be_invoked.Move( _deltaPosition );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            
        }
Пример #2
0
        static int _m_FinalizeMovement(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    UnityEngine.Vector3    _nextPosition; translator.Get(L, 2, out _nextPosition);
                    UnityEngine.Quaternion _nextRotation; translator.Get(L, 3, out _nextRotation);

                    gen_to_be_invoked.FinalizeMovement(
                        _nextPosition,
                        _nextRotation);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Пример #3
0
        static int _m_GetFeetPosition(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                        UnityEngine.Vector3 gen_ret = gen_to_be_invoked.GetFeetPosition(  );
                        translator.PushUnityEngineVector3(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            
        }
Пример #4
0
        static int _m_SimulateRotationTowards(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    UnityEngine.Vector3 _direction; translator.Get(L, 2, out _direction);
                    float _maxDegrees = (float)LuaAPI.lua_tonumber(L, 3);

                    UnityEngine.Quaternion gen_ret = gen_to_be_invoked.SimulateRotationTowards(
                        _direction,
                        _maxDegrees);
                    translator.PushUnityEngineQuaternion(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Пример #5
0
        static int _m_SetPath(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    PF.Path _path = (PF.Path)translator.GetObject(L, 2, typeof(PF.Path));
                    
                    gen_to_be_invoked.SetPath( _path );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            
        }
Пример #6
0
        static int _m_MovementUpdate(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    float _deltaTime = (float)LuaAPI.lua_tonumber(L, 2);
                    UnityEngine.Vector3    _nextPosition;
                    UnityEngine.Quaternion _nextRotation;

                    gen_to_be_invoked.MovementUpdate(
                        _deltaTime,
                        out _nextPosition,
                        out _nextRotation);
                    translator.PushUnityEngineVector3(L, _nextPosition);

                    translator.PushUnityEngineQuaternion(L, _nextRotation);



                    return(2);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Пример #7
0
        static int _s_set_updateRotation(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.updateRotation = LuaAPI.lua_toboolean(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Пример #8
0
        static int _s_set_movementPlane(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.movementPlane = (PF.IMovementPlane)translator.GetObject(L, 2, typeof(PF.IMovementPlane));
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Пример #9
0
        static int _s_set_centerOffset(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.centerOffset = (float)LuaAPI.lua_tonumber(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Пример #10
0
        static int _s_set_onSearchPath(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.onSearchPath = translator.GetDelegate <System.Action>(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Пример #11
0
        static int _g_get_movementPlane(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                translator.PushAny(L, gen_to_be_invoked.movementPlane);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Пример #12
0
        static int _g_get_rotationIn2D(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.rotationIn2D);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Пример #13
0
        static int _g_get_desiredVelocity(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                translator.PushUnityEngineVector3(L, gen_to_be_invoked.desiredVelocity);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Пример #14
0
        static int _g_get_groundMask(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.groundMask);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
Пример #15
0
        static int _s_set_groundMask(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                Pathfinding.AIBase    gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                UnityEngine.LayerMask gen_value; translator.Get(L, 2, out gen_value);
                gen_to_be_invoked.groundMask = gen_value;
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
Пример #16
0
        static int _s_set_destination(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Pathfinding.AIBase gen_to_be_invoked = (Pathfinding.AIBase)translator.FastGetCSObj(L, 1);
                UnityEngine.Vector3 gen_value;translator.Get(L, 2, out gen_value);
				gen_to_be_invoked.destination = gen_value;
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
Пример #17
0
        static int _m_Teleport(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && translator.Assignable <UnityEngine.Vector3>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    UnityEngine.Vector3 _newPosition; translator.Get(L, 2, out _newPosition);
                    bool _clearPath = LuaAPI.lua_toboolean(L, 3);

                    gen_to_be_invoked.Teleport(
                        _newPosition,
                        _clearPath);



                    return(0);
                }
                if (gen_param_count == 2 && translator.Assignable <UnityEngine.Vector3>(L, 2))
                {
                    UnityEngine.Vector3 _newPosition; translator.Get(L, 2, out _newPosition);

                    gen_to_be_invoked.Teleport(
                        _newPosition);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to Pathfinding.AIBase.Teleport!"));
        }
Пример #18
0
        static int _m_SearchPath(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    gen_to_be_invoked.SearchPath(  );



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