ELEC2645 (2018/19) / Mbed 2 deprecated el17m2h_public

Dependencies:   mbed

Revision:
3:116913e97fd7
Parent:
2:360a6c301a4e
Child:
5:8814d6de77d0
--- a/Floors/Floors.cpp	Wed Apr 10 17:34:02 2019 +0000
+++ b/Floors/Floors.cpp	Wed Apr 10 19:07:41 2019 +0000
@@ -4,20 +4,20 @@
 }
 Floors::~Floors(){
 }
-// screen WIDTH =84 and HEIGHT = 48
-    
-void Floors::init(int _x, int _y, int height, int width){
+
+void Floors::init(int x, int y, int width, int height){
     _height = height;
     _width = width;
-
-
+    
+    _x = x;
+    _y = y;
     
     _velocity.x = 0;
-    _velocity.y = 1;
+    _velocity.y = 0;
 }
 
 void Floors::draw(N5110 &lcd){
-    lcd.drawRect(_x, _y, _height, _width,FILL_BLACK);
+    lcd.drawRect(_x, _y, _width, _height, FILL_BLACK);
 }