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: money/money.cpp
- Revision:
- 25:1d91ab97d86a
- Parent:
- 18:78001ecadcb2
--- a/money/money.cpp Mon Apr 30 16:40:32 2018 +0000
+++ b/money/money.cpp Mon Apr 30 18:07:51 2018 +0000
@@ -11,7 +11,7 @@
void money::init(int x,int y)
{
- money_x = x;
+ money_x = x; //initialize the s and y position of money
money_y = y;
}
@@ -19,18 +19,15 @@
void money::draw(N5110 &lcd)
{
//draw the money
- lcd.drawRect(money_x,money_y,4,4,FILL_TRANSPARENT);
-
+ lcd.drawRect(money_x,money_y,4,4,FILL_TRANSPARENT);
}
void money::update()
{
- //set the falling speed of money is 1
+ //set the falling speed of money is 2
//update the movement of money
money_speed = 2;
money_y+= money_speed;
-
-
}
Vector2D money::get_pos()