mirror of
https://github.com/dylanbenzi/pacmen-sfml.git
synced 2026-11-27 08:26:59 +00:00
modify drawing of entity
This commit is contained in:
+3
-1
@@ -30,7 +30,7 @@ struct EntityAnimation {
|
||||
std::vector<sf::Sprite> sprites;
|
||||
};
|
||||
|
||||
class Entity : public sf::Transformable {
|
||||
class Entity : public sf::Transformable, public sf::Drawable {
|
||||
public:
|
||||
Entity() : movementSpeed({5.0f, 5.0f}) {};
|
||||
|
||||
@@ -43,6 +43,8 @@ public:
|
||||
void move(MovementDir dir);
|
||||
|
||||
protected:
|
||||
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const override;
|
||||
|
||||
sf::Vector2i tileSize;
|
||||
|
||||
std::vector<EntityAnimation> animations;
|
||||
|
||||
Reference in New Issue
Block a user