From 47d9d7884c57c2c14dd363b4ccb0df1dcbb5375e Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 12 Mar 2015 22:46:32 -0400 Subject: Fixed bug that would prevent player from continuing to move after dying, and also refactored collisions and dying a bit --- src/components.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/components.h') diff --git a/src/components.h b/src/components.h index f182590..f421529 100644 --- a/src/components.h +++ b/src/components.h @@ -77,13 +77,22 @@ class MapCollisionComponent : public Component { }; struct Collision { + enum class Type { + wall, + wrap, + teleport, + reverse, + platform, + danger + }; + int axis; int lower; int upper; - int type; + Type type; }; - void addCollision(int axis, int lower, int upper, Direction dir, int type); + void addCollision(int axis, int lower, int upper, Direction dir, Collision::Type type); bool processCollision(Game& game, Entity& collider, Collision collision, Direction dir); std::list left_collisions; -- cgit 1.4.1