![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
test 1 doc
Engine/Engine.h
- Committer:
- joebarhouch
- Date:
- 2020-05-27
- Revision:
- 12:eb8d30593e95
- Parent:
- 11:b3024ab59fa5
- Child:
- 13:cb5ed2f0cbd5
File content as of revision 12:eb8d30593e95:
#ifndef ENGINE_H #define ENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Player.h" #include "Platform.h" #include "Enemy.h" #include "Coin.h" #include <vector> void drawMap(N5110 &lcd); class Engine { public: Engine(); ~Engine(); void init(); void read_input(Gamepad &pad); void update(Gamepad &pad); void draw(N5110 &lcd); void floorCollide(); void spawnEnemy(); bool enemyCollide(); bool fellDown(); bool koed(); void gameOver(N5110 &lcd); void coinTaken(); private: //player object Player _p; // player coordinates int _px; int _py; Vector2D player; // coin object Coin coin; //gamepad Direction _d; float _mag; //physics bool _jump; int _Ypos; bool _fall; bool _c; //enemy vector <Enemy> enemies; bool ko1; bool ko2; }; #endif