James Heavey / Mbed 2 deprecated EL17JH

Dependencies:   mbed

Revision:
31:516d4e27765a
Parent:
30:e3d2f0ca416f
Child:
32:4dba7a85dbb2
--- a/BreakoutEngine/BreakoutEngine.cpp	Wed Apr 24 05:56:06 2019 +0000
+++ b/BreakoutEngine/BreakoutEngine.cpp	Wed Apr 24 05:59:02 2019 +0000
@@ -53,8 +53,6 @@
     _laser1.init(-10);
     _laser2.init(-10);
     _laser3.init(-10);
-    _laser4.init(-10);
-    _laser5.init(-10);
     
     //listofBricks.push_back(_brick11);  maybe be able yo iterate through and this.draw(), maybe useful if i figure out how to delete objects aswell
     //listofBricks.push_back(_brick12);
@@ -89,7 +87,7 @@
     else {
         _p1.set_joy();
     }
-    if (pad.check_event(Gamepad::B_PRESSED)) {  // max of 5 lasers on screen at once
+    if (pad.check_event(Gamepad::B_PRESSED)) {  // max of 3 lasers on screen at once
         
         Vector2D p_pos = _p1.get_pos();
         switch(_index){
@@ -112,20 +110,6 @@
                 laser3_pos.x = p_pos.x+7;
                 laser3_pos.y = p_pos.y;
                 _laser3.set_pos(laser3_pos);
-                inc_index();
-                break;
-            case 3:
-                Vector2D laser4_pos = _laser4.get_pos();
-                laser4_pos.x = p_pos.x+7;
-                laser4_pos.y = p_pos.y;
-                _laser1.set_pos(laser4_pos);
-                inc_index();
-                break;
-            case 4:
-                Vector2D laser5_pos = _laser5.get_pos();
-                laser5_pos.x = p_pos.x+7;
-                laser5_pos.y = p_pos.y;
-                _laser5.set_pos(laser5_pos);
                 reset_index();
                 break;
         }
@@ -178,8 +162,6 @@
     _laser1.draw(lcd);
     _laser2.draw(lcd);
     _laser3.draw(lcd);
-    _laser4.draw(lcd);
-    _laser5.draw(lcd);
     
     
 //    for (it = listofBricks.begin(); it != listofBricks.end(); it++)
@@ -212,8 +194,6 @@
     _laser1.update();
     _laser2.update();
     _laser3.update();
-    _laser4.update();
-    _laser5.update();
     lives_leds(pad);
     
     check_wall_collision(pad);