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
Diff: alien/alien.cpp
- Revision:
- 14:6c4bce33c1a1
- Parent:
- 13:9d6ee753eca6
- Child:
- 15:ebbd903455f0
--- a/alien/alien.cpp Fri Apr 19 17:33:57 2019 +0000
+++ b/alien/alien.cpp Fri Apr 19 17:41:34 2019 +0000
@@ -40,9 +40,13 @@
}
- void Ball::draw(N5110 &lcd)
+ void alien::draw(N5110 &lcd)
{
lcd.drawRect(_x,_y,_size,_size,FILL_BLACK);
}
-
+ void alien::update()
+{
+ _x += _velocity.x;
+ _y += _velocity.y;
+}