]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/Creature.hpp
eating and drinking
[blobs.git] / src / creature / Creature.hpp
index 7c3d1ef0f924cad93614a7c8dba26a59d005fbf5..aaeb6cfb544387a654d5017483ee000caed1b10a 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef BLOBS_CREATURE_CREATURE_HPP_
 #define BLOBS_CREATURE_CREATURE_HPP_
 
+#include "Goal.hpp"
 #include "Need.hpp"
 #include "Situation.hpp"
+#include "Steering.hpp"
 #include "../graphics/glm.hpp"
 #include "../graphics/SimpleVAO.hpp"
 
@@ -47,11 +49,20 @@ public:
        void AddNeed(std::unique_ptr<Need> &&n) { needs.emplace_back(std::move(n)); }
        const std::vector<std::unique_ptr<Need>> &Needs() const noexcept { return needs; }
 
+       void AddGoal(std::unique_ptr<Goal> &&);
+       const std::vector<std::unique_ptr<Goal>> &Goals() const noexcept { return goals; }
+
        void Tick(double dt);
 
        Situation &GetSituation() noexcept { return situation; }
        const Situation &GetSituation() const noexcept { return situation; }
 
+       Steering &GetSteering() noexcept { return steering; }
+       const Steering &GetSteering() const noexcept { return steering; }
+
+       void Velocity(const glm::dvec3 &v) noexcept { vel = v; }
+       const glm::dvec3 &Velocity() const noexcept { return vel; }
+
        glm::dmat4 LocalTransform() noexcept;
 
        void BuildVAO();
@@ -60,9 +71,14 @@ public:
 private:
        std::string name;
        double health;
+
        std::vector<std::unique_ptr<Need>> needs;
+       std::vector<std::unique_ptr<Goal>> goals;
 
        Situation situation;
+       Steering steering;
+
+       glm::dvec3 vel;
 
        struct Attributes {
                glm::vec3 position;