X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FBody.hpp;h=3db5e37e362b3de7352dac22ee6a4a848dac5652;hb=bcf776b6d51aeb9147bde32da8dd0768b10db993;hp=fba121b90995d113c2fad374c39db8bd7ae28942;hpb=196f02bdbbd372b77141201f045fcfea318093b1;p=blobs.git diff --git a/src/world/Body.hpp b/src/world/Body.hpp index fba121b..3db5e37 100644 --- a/src/world/Body.hpp +++ b/src/world/Body.hpp @@ -11,12 +11,14 @@ namespace blobs { namespace app { class Assets; } +namespace creature { + class Creature; +} namespace graphics { class Viewport; } namespace world { -class Creature; class Simulation; class Body { @@ -82,12 +84,18 @@ 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 *); - std::vector &Creatures() noexcept { return creatures; } - const std::vector &Creatures() const noexcept { return creatures; } + void AddCreature(creature::Creature *); + void RemoveCreature(creature::Creature *); + std::vector &Creatures() noexcept { return creatures; } + const std::vector &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 &); @@ -110,7 +118,8 @@ private: glm::dmat4 local; glm::dmat4 inverse_local; - std::vector creatures; + std::vector creatures; + int atmosphere; };