Andreas Garmannslund / Mbed 2 deprecated SimplePlatformGame

Dependencies:   N5110 PinDetect PowerControl mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Enemy.h Source File

Enemy.h

00001 #ifndef ENEMY_H
00002 #define ENEMY_H
00003 
00004 /// @file Entity.h
00005 
00006 #include "Entity.h "
00007 
00008 /// Enemy class
00009 class Enemy : public Entity
00010 {
00011     public:
00012         /// Different type of enemies
00013         enum Type{SIMPLE, JUMPER, RUNNER};
00014     
00015     public:
00016         Enemy(int x, int y, bool facingLeft, Type type = SIMPLE) : Entity(x,y), type(type) {setup();}
00017         
00018         /// What type of enemy it is.
00019         Type type;      
00020         
00021         /// Multiplier used for giving more points
00022         int difficulty; 
00023         
00024         /// Probability (in percent) of trying to jump if at ground.
00025         int jumpRate;
00026         
00027         private:
00028             void setup();
00029 };
00030 #endif