From 6b1dcc5df51df4a2d8b724187eb1bcdb4fd9df8b Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 14 Mar 2015 19:25:23 -0400 Subject: Added sound when you hit the ground Also split up components.cpp into files for each class, fixed a bug concerning falling off the screen when you change maps, and converted collision data into doubles. --- src/components/user_movement.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/components/user_movement.h (limited to 'src/components/user_movement.h') diff --git a/src/components/user_movement.h b/src/components/user_movement.h new file mode 100644 index 0000000..1bcf05e --- /dev/null +++ b/src/components/user_movement.h @@ -0,0 +1,19 @@ +#ifndef USER_MOVEMENT_H +#define USER_MOVEMENT_H + +#include "entity.h" + +class Game; + +class UserMovementComponent : public Component { + public: + void input(Game& game, Entity& entity, int key, int action); + void receive(Game&, Entity&, const Message& msg); + + private: + bool holdingLeft = false; + bool holdingRight = false; + bool frozen = false; +}; + +#endif -- cgit 1.4.1