-
Печенин Данила Михайлович authoredd55b9527
#pragma once
#include <States/GameState/Entities/IEntity.h>
#include <States/GameState/Entities/IVisitable.h>
struct IStaticEntity : IEntity, IVisitable {
[[nodiscard]] virtual std::unique_ptr<IStaticEntity> clone() const = 0;
~IStaticEntity() override = default;
};
class Food final : public IStaticEntity {
public:
Food();
[[nodiscard]] std::unique_ptr<IStaticEntity> clone() const override;
void draw_into(sf::RenderWindow& window) const override;
void prepare_for_first_drawing() override;
void prepare_for_drawing() override;
sf::FloatRect getBounds() const { return m_circle.getGlobalBounds(); }
std::unique_ptr<IGameEvent> accept(IVisitor* ptr_visitor) override { return ptr_visitor->visit(this); }
private:
sf::CircleShape m_circle;
};