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
Fork of el17ajf by
Engine/Engine.cpp
- Committer:
- el17ajf
- Date:
- 2019-03-17
- Revision:
- 11:fba7d54fd36b
- Parent:
- 9:3a7776a29a11
- Child:
- 12:beb0d7632531
File content as of revision 11:fba7d54fd36b:
#include "Engine.h"
#include "mbed.h"
Engine::Engine() {
Graphics::init();
}
Engine::~Engine() {
Graphics::deinit();
}
void Engine::loop() {
while (true) {
Input::update();
Graphics::clear();
if (Menus::count() == 0) {
game.update();
}
game.draw();
if (Menus::count() > 0) {
Menus::updateAndDraw();
}
Graphics::render();
// printf("tick\n");
wait_ms(1000 / Engine::FPS);
}
}
