diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-10 09:21:58 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-10 09:21:58 +0100 |
commit | 6fc38e15e4b88d480d5fcb69eec36f7d8685e853 (patch) | |
tree | 9c00423c3b6bc4572ec374299355e67016ac0b5a /src/crepe/system/AISystem.h | |
parent | 7b3e1090f314e5ad669add8cabd9dd2cda790a0f (diff) |
Passing transform by reference
Diffstat (limited to 'src/crepe/system/AISystem.h')
-rw-r--r-- | src/crepe/system/AISystem.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/crepe/system/AISystem.h b/src/crepe/system/AISystem.h index 9a937d2..d5f8a8e 100644 --- a/src/crepe/system/AISystem.h +++ b/src/crepe/system/AISystem.h @@ -4,6 +4,7 @@ #include "api/Rigidbody.h" #include "System.h" +#include "api/Transform.h" #include "types.h" namespace crepe { @@ -44,33 +45,37 @@ private: * * \param ai The AI component * \param rigidbody The Rigidbody component + * \param transform The Transform component * \return The seek force */ - vec2 seek(const AI & ai, const Rigidbody & rigidbody) const; + vec2 seek(const AI & ai, const Rigidbody & rigidbody, const Transform & transform) const; /** * \brief Calculate the flee force * * \param ai The AI component * \param rigidbody The Rigidbody component + * \param transform The Transform component * \return The flee force */ - vec2 flee(const AI & ai, const Rigidbody & rigidbody) const; + vec2 flee(const AI & ai, const Rigidbody & rigidbody, const Transform & transform) const; /** * \brief Calculate the arrive force * * \param ai The AI component * \param rigidbody The Rigidbody component + * \param transform The Transform component * \return The arrive force */ - vec2 arrive(const AI & ai, const Rigidbody & rigidbody) const; + vec2 arrive(const AI & ai, const Rigidbody & rigidbody, const Transform & transform) const; /** * \brief Calculate the path follow force * * \param ai The AI component * \param rigidbody The Rigidbody component + * \param transform The Transform component * \return The path follow force */ - vec2 path_follow(AI & ai, const Rigidbody & rigidbody); + vec2 path_follow(AI & ai, const Rigidbody & rigidbody, const Transform & transform); }; } // namespace crepe |