![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
test 1 doc
Engine/Engine.h
- Committer:
- joebarhouch
- Date:
- 2020-05-27
- Revision:
- 11:b3024ab59fa5
- Parent:
- 10:9317a62bd4d0
- Child:
- 12:eb8d30593e95
File content as of revision 11:b3024ab59fa5:
#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(); void gameOver(N5110 &lcd); bool ko; private: //player object Player _p; // player coordinates int _px; int _py; Vector2D player; //gamepad Direction _d; float _mag; //physics bool _jump; int _Ypos; bool _fall; bool _c; //enemy vector <Enemy> enemies; }; #endif