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:
- 27:eab2cf10554e
- Parent:
- 18:78001ecadcb2
diff -r 6a1476a0bba9 -r eab2cf10554e money/money.cpp
--- a/money/money.cpp Mon Apr 30 19:12:41 2018 +0000
+++ b/money/money.cpp Mon Apr 30 20:29:26 2018 +0000
@@ -1,36 +1,30 @@
#include "money.h"
money::money()
-{
-
+{
}
money::~money()
-{
-
+{
}
void money::init(int x,int y)
{
money_x = x;
- money_y = y;
-
+ money_y = y;
}
void money::draw(N5110 &lcd)
{
- //draw the money
- lcd.drawRect(money_x,money_y,4,4,FILL_TRANSPARENT);
-
+ //draw the money
+ 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()