diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-07 15:54:13 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-07 15:54:13 +0100 |
commit | a61149733e8661c97f15fc99e5b28489c29a2b22 (patch) | |
tree | f164cdb849097b6dffb4dcf093e2b9a1a28adaaf /src/crepe/system/AISystem.h | |
parent | fdb4c99e139a264d4e15e6913a3756fc6cccb2f2 (diff) | |
parent | 33a072db28d71ba65e59f9491abd42dbf9695fc4 (diff) |
merge AI
Diffstat (limited to 'src/crepe/system/AISystem.h')
-rw-r--r-- | src/crepe/system/AISystem.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/crepe/system/AISystem.h b/src/crepe/system/AISystem.h new file mode 100644 index 0000000..27861d9 --- /dev/null +++ b/src/crepe/system/AISystem.h @@ -0,0 +1,26 @@ +#pragma once + +#include "api/AI.h" + +#include "System.h" +#include "types.h" + +namespace crepe { + +class AISystem : public System { +public: + using System::System; + + void update() override; + +private: + vec2 calculate(AI & ai); + bool accumulate_force(AI & ai, vec2 & running_total, vec2 force_to_add); + + vec2 seek(const AI & ai); + vec2 flee(const AI & ai); + vec2 arrive(const AI & ai); + vec2 path_follow(AI & ai); +}; + +} // namespace crepe |