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
engine/engine.cpp
- Committer:
- RickYu
- Date:
- 2018-04-15
- Revision:
- 3:1a134243e2f0
- Parent:
- 2:421fb0670c5c
- Child:
- 4:55d904040636
File content as of revision 3:1a134243e2f0:
#include "engine.h"
engine::engine()
{
}
engine::~engine()
{
}
void engine::init(int rect_height,int speed,int rect_width)
{
// initialise the game parameters
_speed = speed;
}
void engine::draw(N5110 &lcd)
{
_rect.draw(lcd);
_boom.draw(lcd);
}
void engine::read_input(Gamepad &pad)
{
_d = pad.get_direction();
_mag = pad.get_mag();
}
void engine::update(Gamepad &pad)
{
_rect.update(_d,_mag);
_boom.update(_d,_mag);
}