Li Ruofan 201199450

Dependencies:   mbed Gamepad Joystick

Revision:
6:cbd9e1f26a10
Parent:
5:e3a9f0548922
Child:
7:e3844250b77d
--- a/main.cpp	Fri May 15 19:57:40 2020 +0000
+++ b/main.cpp	Fri May 15 21:16:14 2020 +0000
@@ -34,7 +34,6 @@
 int curScore = 0;
 int fail = 0;
 int count = 0;
-int mode = 0;
 
 ///////////// prototypes ///////////////
 void attack();
@@ -140,22 +139,17 @@
 //UFO moves downwards until meets the spaceship
 void attack() { 
     if(UFO == NULL){
-        UFO = new UFO(mode);
+        UFO = new UFO;
         UFO->init(12,5);
-        UFO->draw(lcd,mode);
+        UFO->draw(lcd);
         lcd.refresh();
     } else {
         UFO->update();
         if(UFO->getPos().y>=33){
             fail = 1;
         }else{
-            UFO->draw(lcd,mode);
+            UFO->draw(lcd);
             lcd.refresh();
         }
     }
-}
-
-
-
-
-
+}
\ No newline at end of file