]> git.localhorst.tv Git - blank.git/blobdiff - src/ai/Chaser.hpp
merge common parts of pre- and unload states
[blank.git] / src / ai / Chaser.hpp
index 6daaf3639934fe5d70e5609767d9d0530133eceb..43667c06d332686471f3036be79ce003dc1a017d 100644 (file)
@@ -6,11 +6,13 @@
 
 namespace blank {
 
+class World;
+
 class Chaser
 : public Controller {
 
 public:
-       Chaser(Entity &ctrl, Entity &tgt) noexcept;
+       Chaser(World &, Entity &ctrl, Entity &tgt) noexcept;
        ~Chaser();
 
        Entity &Target() noexcept { return tgt; }
@@ -19,8 +21,10 @@ public:
        void Update(int dt) override;
 
 private:
+       World &world;
        Entity &tgt;
-       float speed;
+       float chase_speed;
+       float flee_speed;
        float stop_dist;
        float flee_dist;