Library containing the Game Engine
GameEngine.h
- Committer:
- ll14c4p
- Date:
- 2017-05-04
- Revision:
- 12:6eeb06ed7c6b
- Parent:
- 11:832eb031310b
- Child:
- 13:63013a418903
File content as of revision 12:6eeb06ed7c6b:
#ifndef GAMEENGINE_H #define GAMEENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Player.h" #include "Projectile.h" #include "Target.h" #include "HealthBar.h" class GameEngine { public: /** * * */ GameEngine(); /** * * */ ~GameEngine(); /** Initialise Game Engine * * This function */ void init( ); /** Read Input * * This function */ void read_input(Gamepad &pad); /** Update * * This function */ void update(Gamepad &pad); /** Draw * * This function */ void draw(N5110 &lcd, Gamepad &pad); /** Get Position * * This function */ void get_pos(); int playerx; int playery; int score; private: Player _p; Projectile _proj; Target _t; Target _tt; Target _ttt; HealthBar _hb; int _speed; Direction _d; float _mag; void CheckProjTargetCollision(Gamepad &pad); void CheckPlayerTargetCollision(Gamepad &pad); void CheckTargetFloorCollision(Gamepad &pad); int HP; int n; int HPLost1; int HPLost2; }; #endif