This commit is contained in:
Aaron Kimbre
2022-10-24 21:09:23 -05:00
parent f02e9c0f6a
commit 3386bf54a4
3 changed files with 167 additions and 4 deletions

View File

@@ -257,6 +257,36 @@ public:
*/
std::vector<float> GetActivePickupRadiusScales() { return m_ActivePickupRadiusScales; };
/**
* @brief tell an npc how to use it's given path
*
* @param paused if they are not moving
*/
void FollowWaypoints(bool paused) {m_Paused = paused;};
/**
* @brief tell an npc how to use it's given path
*
* @param paused if they are not moving
* @param newPathName the new path to use
* @param newPathStart the waypoint on the new path to start at
*/
void FollowWaypoints(bool paused, std::string newPathName, int newPathStart = 0);
/**
* @brief tell an npc how to use it's given path
*
* @param newPathName the new path to use
* @param newPathStart the waypoint on the new path to start at
*/
void FollowWaypoints(std::string newPathName, int newPathStart = 0);
/**
* @brief starts pathing
*
*/
void FollowWaypoints(){m_Paused = false;};
private:
/**
* The entity that owns this component
@@ -372,6 +402,32 @@ private:
* If the entity is teleporting
*/
bool m_IsTeleporting;
/**
* The walking path the entity has
*/
std::string m_AttachedPath;
/**
* The curent pay waypoint
*/
int m_PathWaypoint;
/**
* If the path is being followed
*/
bool m_Paused = false;
/**
* the speed at which they will path
*/
float m_PathSpeed;
/**
* if we are waiting on a delay
*/
float m_PausedTime = 0.0;
};
#endif // CONTROLLABLEPHYSICSCOMPONENT_H