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-12
- Revision:
- 2:421fb0670c5c
- Child:
- 3:1a134243e2f0
File content as of revision 2:421fb0670c5c:
#include "engine.h"
engine::engine()
{
}
engine::~engine()
{
}
void engine::init(int rect_height,int speed,int rect_width)
{
// initialise the game parameters
_rect_height = rect_height;
_rect_width = rect_width;
_speed = speed;
// puts rects and ball in middle
//rect.init(_rectx,_rect_height);
}
void engine::draw(N5110 &lcd)
{
_rect.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);
}