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: mbed N5110 ShiftReg PinDetect
Diff: Game.h
- Revision:
- 16:caf613d5b85e
- Parent:
- 15:d5eb13c4c1c6
- Child:
- 17:d6a3b29cab31
--- a/Game.h Sun May 10 09:37:51 2015 +0000 +++ b/Game.h Sun May 10 13:14:33 2015 +0000 @@ -46,20 +46,21 @@ private: /// Moves entity in map. If collision occurs, entity can not move further + void spawnEnemy(); /// Spawns a new enemy + void moveEnemies(); /// Movement and AI for all enemies void moveWithCollisionTest(Entity* entity, const int map[HEIGHT][WIDTH]); bool hitTestRect(Rectangle r1, Rectangle r2); /// Returns true if two rectangles overlap bool bulletHitMap(Rectangle &bulletColRect, const int map[HEIGHT][WIDTH]); /// Help function for detecting collision between moving bullet and map. void init(); /// Sets some initial values Entity player; /// Player object - Enemy *enemy; /// Enemy object bool releasedBtnB; /// True if button B has been released after being pressed down bool releasedBtnC; bool paused; // True if the game is paused - std::vector<Point*> bullets; /// Container for bullets + std::vector<Enemy*> enemies; /// Container for enemies }; #endif