test 1 doc

Dependencies:   mbed Gamepad2

Committer:
joebarhouch
Date:
Mon May 18 16:06:27 2020 +0000
Revision:
3:e4e1cbf750b6
Child:
5:928c2eee4109
Character movement with game engine

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joebarhouch 3:e4e1cbf750b6 1 #ifndef ENGINE_H
joebarhouch 3:e4e1cbf750b6 2 #define ENGINE_H
joebarhouch 3:e4e1cbf750b6 3
joebarhouch 3:e4e1cbf750b6 4 #include "mbed.h"
joebarhouch 3:e4e1cbf750b6 5 #include "N5110.h"
joebarhouch 3:e4e1cbf750b6 6 #include "Gamepad.h"
joebarhouch 3:e4e1cbf750b6 7 #include "Player.h"
joebarhouch 3:e4e1cbf750b6 8
joebarhouch 3:e4e1cbf750b6 9
joebarhouch 3:e4e1cbf750b6 10 class Engine
joebarhouch 3:e4e1cbf750b6 11 {
joebarhouch 3:e4e1cbf750b6 12
joebarhouch 3:e4e1cbf750b6 13 public:
joebarhouch 3:e4e1cbf750b6 14 Engine();
joebarhouch 3:e4e1cbf750b6 15 ~Engine();
joebarhouch 3:e4e1cbf750b6 16
joebarhouch 3:e4e1cbf750b6 17 void init();
joebarhouch 3:e4e1cbf750b6 18 void read_input(Gamepad &pad);
joebarhouch 3:e4e1cbf750b6 19 void update(Gamepad &pad);
joebarhouch 3:e4e1cbf750b6 20 void draw(N5110 &lcd);
joebarhouch 3:e4e1cbf750b6 21
joebarhouch 3:e4e1cbf750b6 22 private:
joebarhouch 3:e4e1cbf750b6 23
joebarhouch 3:e4e1cbf750b6 24 void wallCollide(Gamepad &pad);
joebarhouch 3:e4e1cbf750b6 25 void ennemyCollide(Gamepad &pad);
joebarhouch 3:e4e1cbf750b6 26 void print_health(N5110 &lcd);
joebarhouch 3:e4e1cbf750b6 27
joebarhouch 3:e4e1cbf750b6 28 Player _p;
joebarhouch 3:e4e1cbf750b6 29 int _speed;
joebarhouch 3:e4e1cbf750b6 30
joebarhouch 3:e4e1cbf750b6 31 // player coordinates
joebarhouch 3:e4e1cbf750b6 32 int _px;
joebarhouch 3:e4e1cbf750b6 33 int _py;
joebarhouch 3:e4e1cbf750b6 34
joebarhouch 3:e4e1cbf750b6 35 Direction _d;
joebarhouch 3:e4e1cbf750b6 36 float _mag;
joebarhouch 3:e4e1cbf750b6 37
joebarhouch 3:e4e1cbf750b6 38 };
joebarhouch 3:e4e1cbf750b6 39
joebarhouch 3:e4e1cbf750b6 40 #endif