]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/Body.hpp
basic needs
[blobs.git] / src / world / Body.hpp
index 5f82be232b4dc3e78029fd27338b122ab4a41421..3db5e37e362b3de7352dac22ee6a4a848dac5652 100644 (file)
@@ -11,6 +11,9 @@ namespace blobs {
 namespace app {
        class Assets;
 }
+namespace creature {
+       class Creature;
+}
 namespace graphics {
        class Viewport;
 }
@@ -81,8 +84,19 @@ public:
 
        virtual void Draw(app::Assets &, graphics::Viewport &) { }
 
+       void Tick(double dt);
        void Cache() noexcept;
 
+       // body takes over ownership of given pointer
+       void AddCreature(creature::Creature *);
+       void RemoveCreature(creature::Creature *);
+       std::vector<creature::Creature *> &Creatures() noexcept { return creatures; }
+       const std::vector<creature::Creature *> &Creatures() const noexcept { return creatures; }
+
+       void Atmosphere(int a) noexcept { atmosphere = a; }
+       int Atmosphere() const noexcept { return atmosphere; }
+       bool HasAtmosphere() const noexcept { return atmosphere >= 0; }
+
 private:
        void AddChild(Body &);
        void RemoveChild(Body &);
@@ -104,6 +118,9 @@ private:
        glm::dmat4 local;
        glm::dmat4 inverse_local;
 
+       std::vector<creature::Creature *> creatures;
+       int atmosphere;
+
 };
 
 }