Andreas Garmannslund / Mbed 2 deprecated SimplePlatformGame

Dependencies:   N5110 PinDetect PowerControl mbed

Revision:
16:caf613d5b85e
Parent:
15:d5eb13c4c1c6
Child:
17:d6a3b29cab31
diff -r d5eb13c4c1c6 -r caf613d5b85e Entity.h
--- a/Entity.h	Sun May 10 09:37:51 2015 +0000
+++ b/Entity.h	Sun May 10 13:14:33 2015 +0000
@@ -1,5 +1,6 @@
 #ifndef ENTITY_H
 #define ENTITY_H
+/// @file Entity.h
 
 /** An entity represents a movable character, such as the player, enemies etc.
 *   Note that the entity class does not contain the sprite (image) of the entity.
@@ -25,11 +26,16 @@
         
 };
 
+/// Enemy class
 class Enemy : public Entity
 {
     public:
-        Enemy(int x, int y, int w, int h) : Entity(x,y,w,h) {dead = false;}
+        enum Type{SIMPLE, JUMPER, RUNNER};
+    
+    public:
+        Enemy(int x, int y, int w, int h, Type type = SIMPLE) : Entity(x,y,w,h), type(type) {dead = false;}
         bool dead;
+        Type type;
 };
 
 #endif
\ No newline at end of file