bird

Dependencies:   mbed

Revision:
0:3887ebee1b37
Child:
1:8672e52115e3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bird/bird.cpp	Fri May 03 17:51:38 2019 +0000
@@ -0,0 +1,33 @@
+#include "bird.h"
+
+
+
+void bird::init()
+{   
+_y = 20;
+}
+
+
+void bird::draw(N5110 &lcd)
+{
+    lcd.drawRect(30,_y,2,2,FILL_BLACK);
+    _y += 3;   
+}
+
+
+void bird::check(Gamepad &pad)
+{
+    while (pad.check_event(Gamepad::A_PRESSED) == true) {
+        _y -= 6;
+       }  
+    }
+
+Data bird::get_data()
+{
+    _data.y = _y;
+    return _data;
+}
+
+
+
+