Animation and fps

This commit is contained in:
Rendo 2026-03-11 19:07:58 +05:00
commit 366bdf7d20
4 changed files with 22 additions and 3 deletions

View file

@ -19,16 +19,22 @@ class Entity{
class Pacman : public Entity{
const int speed = 16;
const int frame_count = 7;
const int fps = 24;
private:
Texture2D texture;
int facing;
Rectangle getTextureRect() const;
public:
unsigned char frame;
float time;
Pacman();
Pacman(Vector2 position);
~Pacman();
void tick() override;
void process() override;
void animation_tick();
void draw() const override;
};