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
Gameengine/Gameengine.h
- Committer:
- el17arm
- Date:
- 2019-04-14
- Revision:
- 38:55bb9da08a52
- Parent:
- 37:4d525a37d5d2
- Child:
- 39:ddca28745388
- Child:
- 40:913339e324b8
File content as of revision 38:55bb9da08a52:
#ifndef GAMEENGINE_H
#define GAMEENGINE_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Sprites.h"
#include "Level1.h"
class Gameengine
{
public:
Gameengine();
~Gameengine();
//void get_miner_pos();
void read_direction(Gamepad &pad);
void update(N5110 &lcd, Gamepad &pad);
void game_init();
void draw(N5110 &lcd, Gamepad &pad);
void lose_life(N5110 &lcd);
bool game_over();
void next_level(N5110 &lcd);
bool enemy_death();
bool trap_death(N5110 &lcd);
void get_miner_pos();
void key_draw(N5110 &lcd,Gamepad &pad);
void blocks(N5110 &lcd);
bool enemies(N5110 &lcd);
private:
int _level_select;
int _lives;
double _x;
double _y;
int _distance;
int _turn_flag;
int _counter;
Sprites _sprites;
Direction _d;
Level1 _l1;
Timer t;
};
#endif