summary refs log tree commit diff stats
path: root/src/components/player_sprite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/player_sprite.h')
-rw-r--r--src/components/player_sprite.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/player_sprite.h b/src/components/player_sprite.h new file mode 100644 index 0000000..b1ac0af --- /dev/null +++ b/src/components/player_sprite.h
@@ -0,0 +1,23 @@
1#ifndef PLAYER_SPRITE_H
2#define PLAYER_SPRITE_H
3
4#include "entity.h"
5#include "renderer.h"
6
7class Game;
8
9class PlayerSpriteComponent : public Component {
10 public:
11 PlayerSpriteComponent();
12 void render(Game& game, Entity& entity, Texture& buffer);
13 void receive(Game& game, Entity& entity, const Message& msg);
14
15 private:
16 Texture sprite;
17 int animFrame = 0;
18 bool facingLeft = false;
19 bool isMoving = false;
20 bool dying = false;
21};
22
23#endif