Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: N5110 PinDetect PowerControl mbed
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
Generated on Tue Jul 12 2022 21:59:47 by
1.7.2