Arturs Kozlovskis / Mbed 2 deprecated ELEC2645_Project_el18ak

Dependencies:   mbed

Revision:
18:8f7291885e19
Parent:
16:e2aaef863d7c
Child:
19:913d123554ee
--- a/My_game_clases/Objects.cpp	Thu May 07 10:36:39 2020 +0000
+++ b/My_game_clases/Objects.cpp	Sat May 09 08:19:00 2020 +0000
@@ -56,18 +56,15 @@
 
     for (int i = 0; i < _shot_y_pos.size(); i++) {
         lcd.drawRect(_shot_x_pos[i],_shot_y_pos[i],2,2,FILL_BLACK);
-        //printf( " %d || %d \n",_shot_x_pos.size(),_shot_y_pos.size());
-        //if(c == true) {
+        
             _shot_y_pos[i] -= _shot_incrementer; // moves the shots upwards
-        //} else {
-        //    _shot_y_pos[i] = _shot_y_pos[i];
-        //}
+       
     }
 
     //adds another shot if the distance between
     //y pos of the initial pos and previous shot pos is more than 7
     if(_shot_y_pos[_shot_y_pos.size() - 1 ] + 7 < _initial_shot_pos || _shot_y_pos.size() < 1) {
-        if(pad.X_held()) {
+        if(pad.A_held()) {
             _shot_y_pos.push_back(_initial_shot_pos);
             _shot_x_pos.push_back(_cannon_pos + 2);
         }