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
Revision 97:58e5b454931f, committed 2019-05-05
- Comitter:
- fy14lkaa
- Date:
- Sun May 05 01:47:15 2019 +0000
- Parent:
- 96:01434284987f
- Child:
- 98:663e584183bf
- Commit message:
- added void draw function to draw the alien by using lcd.drawRect.
Changed in this revision
| Alien/Alien.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Alien/Alien.cpp Sun May 05 01:41:53 2019 +0000
+++ b/Alien/Alien.cpp Sun May 05 01:47:15 2019 +0000
@@ -14,9 +14,14 @@
void Alien::init(int x_alien,int y_alien, int speed_alien)
{
-
+
_x_alien = x_alien;
_y_alien = y_alien;
- _speed_alien = speed_alien;
+ _speed_alien = speed_alien;
}
+
+void Alien::draw(N5110 &lcd)
+{
+ lcd.drawRect(_x_alien,_y_alien,_x_alien+5,_y_alien+5,FILL_BLACK);
+}