diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-10 08:48:06 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-10 08:48:06 +0100 |
commit | c8d05f759bb1be0ec99e8f23eaa65c80c36ce03d (patch) | |
tree | 8d176b831b9619cffc953f368be2eefc9e52c8ca /src/crepe/system/AISystem.h | |
parent | e5e2eefc7f0f6199fe2b36688b2ad64a97784717 (diff) |
Implemented feedback
Diffstat (limited to 'src/crepe/system/AISystem.h')
-rw-r--r-- | src/crepe/system/AISystem.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/crepe/system/AISystem.h b/src/crepe/system/AISystem.h index 670d20d..160df01 100644 --- a/src/crepe/system/AISystem.h +++ b/src/crepe/system/AISystem.h @@ -1,6 +1,7 @@ #pragma once #include "api/AI.h" +#include "api/Rigidbody.h" #include "System.h" #include "types.h" @@ -25,8 +26,9 @@ private: * \brief Calculate the total force to apply to the entity * * \param ai The AI component + * \param rigidbody The Rigidbody component */ - vec2 calculate(AI & ai); + vec2 calculate(AI & ai, const Rigidbody & rigidbody); /** * \brief Accumulate the force to apply to the entity * @@ -35,36 +37,40 @@ private: * \param force_to_add The force to add * \return true if the force was added, false otherwise */ - bool accumulate_force(AI & ai, vec2 & running_total, vec2 force_to_add); + bool accumulate_force(const AI & ai, vec2 & running_total, vec2 force_to_add); /** * \brief Calculate the seek force * * \param ai The AI component + * \param rigidbody The Rigidbody component * \return The seek force */ - vec2 seek(const AI & ai); + vec2 seek(const AI & ai, const Rigidbody & rigidbody) const; /** * \brief Calculate the flee force * * \param ai The AI component + * \param rigidbody The Rigidbody component * \return The flee force */ - vec2 flee(const AI & ai); + vec2 flee(const AI & ai, const Rigidbody & rigidbody) const; /** * \brief Calculate the arrive force * * \param ai The AI component + * \param rigidbody The Rigidbody component * \return The arrive force */ - vec2 arrive(const AI & ai); + vec2 arrive(const AI & ai, const Rigidbody & rigidbody) const; /** * \brief Calculate the path follow force * * \param ai The AI component + * \param rigidbody The Rigidbody component * \return The path follow force */ - vec2 path_follow(AI & ai); + vec2 path_follow(AI & ai, const Rigidbody & rigidbody); }; } // namespace crepe |