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.
Diff: Hero/Hero.cpp
- Revision:
- 3:3d35ab70b565
- Parent:
- 2:ee9b361ba6df
- Child:
- 6:e8c03f264ffc
--- a/Hero/Hero.cpp Sun May 05 21:54:07 2019 +0000
+++ b/Hero/Hero.cpp Mon May 06 19:50:27 2019 +0000
@@ -4,10 +4,11 @@
}
-Hero::~Hero() {
-
+void Hero::init(int swidth, int sheight) {
+ _x = swidth / 2;
+ _y = sheight / 2;
}
void Hero::draw(N5110 &lcd) {
- lcd.drawCircle(39,22,5,FILL_TRANSPARENT);
+ lcd.drawCircle(_x,_y,5,FILL_TRANSPARENT);
}
\ No newline at end of file