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:
- 6:46d0caedf217
- Child:
- 7:1964f649676e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/money/money.cpp Tue Apr 17 20:53:43 2018 +0000
@@ -0,0 +1,41 @@
+#include "money.h"
+money::money()
+{
+
+}
+money::~money()
+{
+
+}
+
+
+void money::init(int x,int y)
+{
+ money_x = x;
+ money_y = y;
+
+}
+
+void money::draw(N5110 &lcd)
+{
+ lcd.drawRect(money_x,money_y,4,4,FILL_TRANSPARENT);
+
+}
+
+void money::update()
+{
+ money_speed = 5;
+ money_y+= money_speed;
+
+
+}
+Vector2D money::get_pos()
+{
+ Vector2D p = {money_x,money_y};
+ return p;
+}
+void money::set_pos(Vector2D p)
+{
+ money_x = p.x;
+ money_y = p.y;
+}