#ifndef HOLESOME_COLLECTABLE_SIMULATION_HPP #define HOLESOME_COLLECTABLE_SIMULATION_HPP #include #include "../../game_object.h" #include "../../collectables/collectable.hpp" class CollectableSimulation : public GameObject { public: explicit CollectableSimulation(const std::shared_ptr &collectable); void physicsUpdate() override; [[nodiscard]] std::shared_ptr getCollectable() const; private: std::shared_ptr world; b2Body* body; std::shared_ptr collectable; void updateGroundHole(); void updateCollectable(); b2Body *addSquareBody(b2BodyType type, sf::Vector2f center, sf::Vector2f size); }; #endif //HOLESOME_COLLECTABLE_SIMULATION_HPP