1 #ifndef BLOBS_CREATURE_CREATURE_HPP_
2 #define BLOBS_CREATURE_CREATURE_HPP_
5 #include "Situation.hpp"
6 #include "../graphics/glm.hpp"
7 #include "../graphics/SimpleVAO.hpp"
33 Creature(const Creature &) = delete;
34 Creature &operator =(const Creature &) = delete;
36 Creature(Creature &&) = delete;
37 Creature &operator =(Creature &&) = delete;
40 void Name(const std::string &n) noexcept { name = n; }
41 const std::string &Name() const noexcept { return name; }
43 void Health(double h) noexcept { health = h; }
44 double Health() const noexcept { return health; }
45 void Hurt(double d) noexcept;
47 void AddNeed(std::unique_ptr<Need> &&n) { needs.emplace_back(std::move(n)); }
48 const std::vector<std::unique_ptr<Need>> &Needs() const noexcept { return needs; }
52 Situation &GetSituation() noexcept { return situation; }
53 const Situation &GetSituation() const noexcept { return situation; }
55 glm::dmat4 LocalTransform() noexcept;
58 void Draw(app::Assets &, graphics::Viewport &);
63 std::vector<std::unique_ptr<Need>> needs;
72 graphics::SimpleVAO<Attributes, unsigned short> vao;
76 /// put creature on planet and configure it to (hopefully) survive
77 void Spawn(Creature &, world::Planet &, app::Assets &);