Grid base

This commit is contained in:
Rendo 2026-03-11 18:48:29 +05:00
commit 0432d6932c
11 changed files with 81 additions and 14 deletions

View file

@ -8,9 +8,11 @@ class Entity{
public:
virtual ~Entity(){}
Vector2 position;
virtual void ready() {}
virtual void process() {}
virtual void draw() {}
virtual void draw() const {}
virtual void tick() {}
};
@ -19,16 +21,15 @@ class Pacman : public Entity{
const int speed = 16;
private:
Texture2D texture;
Vector2 position;
int facing;
Rectangle getTextureRect();
Rectangle getTextureRect() const;
public:
Pacman();
Pacman(Vector2 position);
~Pacman();
void tick() override;
void draw() override;
void draw() const override;
};
class Wall : public Entity {
@ -38,7 +39,7 @@ class Wall : public Entity {
Wall();
~Wall();
void ready() override;
void draw() override;
void draw() const override;
};
#endif