summary refs log tree commit diff stats
path: root/src/components.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.h')
-rw-r--r--src/components.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components.h b/src/components.h index 2585d73..f182590 100644 --- a/src/components.h +++ b/src/components.h
@@ -31,13 +31,13 @@ class PlayerSpriteComponent : public Component {
31 public: 31 public:
32 void render(Game& game, Entity& entity, Texture& buffer); 32 void render(Game& game, Entity& entity, Texture& buffer);
33 void receive(Game& game, Entity& entity, const Message& msg); 33 void receive(Game& game, Entity& entity, const Message& msg);
34 void tick(Game& game, Entity& entity);
35 34
36 private: 35 private:
37 Texture sprite{"../res/Starla.png"}; 36 Texture sprite{"../res/Starla.png"};
38 int animFrame = 0; 37 int animFrame = 0;
39 bool facingLeft = false; 38 bool facingLeft = false;
40 bool isMoving = false; 39 bool isMoving = false;
40 bool dying = false;
41}; 41};
42 42
43class PlayerPhysicsComponent : public Component { 43class PlayerPhysicsComponent : public Component {
@@ -54,6 +54,7 @@ class PlayerPhysicsComponent : public Component {
54 double jump_gravity_short; 54 double jump_gravity_short;
55 int direction = 0; 55 int direction = 0;
56 bool canDrop = false; 56 bool canDrop = false;
57 bool frozen = false;
57}; 58};
58 59
59class MapRenderComponent : public Component { 60class MapRenderComponent : public Component {
@@ -89,8 +90,7 @@ class MapCollisionComponent : public Component {
89 std::list<Collision> right_collisions; 90 std::list<Collision> right_collisions;
90 std::list<Collision> up_collisions; 91 std::list<Collision> up_collisions;
91 std::list<Collision> down_collisions; 92 std::list<Collision> down_collisions;
92 const Map* leftMap; 93 const Map& map;
93 const Map* rightMap;
94}; 94};
95 95
96#endif 96#endif