ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jb

Dependencies:   mbed Gamepad2

Revision:
14:58887d7e1072
Parent:
11:b3024ab59fa5
--- a/Player/Player.cpp	Wed May 27 04:36:22 2020 +0000
+++ b/Player/Player.cpp	Wed May 27 07:48:27 2020 +0000
@@ -27,7 +27,6 @@
 {
     if(_dir == E) {
         Bitmap bit_player(s_player, 8, 9);
-        Bitmap bit_player2(s_player2, 8, 9);
         bit_player.render(lcd, _playerX, _playerY);
     }
 
@@ -59,7 +58,7 @@
         case 0:
             //FREE FALL
             if( fall == true) {
-                _playerY = _playerY + 4;
+                _playerY = _playerY + GRAVITY ;
             }
 
             //FLOOR COLLISION
@@ -70,7 +69,7 @@
 
         case 1:
             //JUMP UNTIL TWICE PLAYER HEIGHT
-            _playerY -= 5;
+            _playerY -= GRAVITY +1;
 
             break;