X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fai%2FRandomWalk.hpp;h=339e77d3566a8fa9fe33b4c04ea213076ebf4aca;hb=80a9a59d71a7b144c12f64cbef4644751bd54745;hp=a25d4db502bedf56ca98affa5997ff89646185cf;hpb=c52405fad9c070e1370f852234c6eb723b52916c;p=blank.git diff --git a/src/ai/RandomWalk.hpp b/src/ai/RandomWalk.hpp index a25d4db..339e77d 100644 --- a/src/ai/RandomWalk.hpp +++ b/src/ai/RandomWalk.hpp @@ -3,6 +3,10 @@ #include "Controller.hpp" +#include "../rand/GaloisLFSR.hpp" + +#include + namespace blank { @@ -11,13 +15,23 @@ class RandomWalk : public Controller { public: - explicit RandomWalk(Entity &) noexcept; + RandomWalk(Entity &, std::uint64_t seed) noexcept; ~RandomWalk(); void Update(int dt) override; private: - int time_left; + void Change() noexcept; + +private: + GaloisLFSR random; + + glm::vec3 start_vel; + glm::vec3 target_vel; + + int switch_time; + float lerp_max; + float lerp_time; };