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.cpp
- Committer:
- el17arm
- Date:
- 2019-03-29
- Revision:
- 15:2bda80896a84
- Parent:
- 14:dc3524d11921
- Child:
- 16:8384e9a480ef
File content as of revision 15:2bda80896a84:
#include "Gameengine.h"
Gameengine::Gameengine()
{
}
Gameengine::~Gameengine()
{
}
void Gameengine::game_init()
{
_level_select = 1;
_miner.miner_init(3, 33);
}
void Gameengine::read_direction(Gamepad &pad)
{
_d = pad.get_direction();
}
void Gameengine::update(N5110 &lcd, Gamepad &pad)
{
_miner.miner_move(_d);
_miner.miner_gravity(lcd);
_miner.miner_jump(lcd, pad);
_miner.miner_land(lcd);
_miner.level_one_collision(lcd);
}
void Gameengine::draw(N5110 &lcd)
{
if (_level_select == 1){
_miner.miner_draw(lcd);
_level.level_one(lcd);
_miner.level_one_collision(lcd);
}
}