Steven Mahasin / Mbed 2 deprecated DreamDungeon

Dependencies:   mbed MotionSensor

Revision:
11:63e54f6e7939
Parent:
10:1a3499f6b583
Child:
12:a1c1991835ca
diff -r 1a3499f6b583 -r 63e54f6e7939 Entity/Player/Player.cpp
--- a/Entity/Player/Player.cpp	Sun Apr 21 23:23:35 2019 +0000
+++ b/Entity/Player/Player.cpp	Tue Apr 23 03:10:09 2019 +0000
@@ -16,11 +16,11 @@
 }
 
 void Player::move(float mapped_x, float mapped_y){
-    if(!matrix_collision_test(position.x + 1.2f*mapped_x, position.y, 0)){
-        position.x += 1.2f*mapped_x;
+    if(!matrix_collision_test(position.x + player_speed*mapped_x, position.y, 0)){
+        position.x += player_speed*mapped_x;
     }
-    if(!matrix_collision_test(position.x, position.y - 1.2f*mapped_y, 0)){
-        position.y -= 1.2f*mapped_y;
+    if(!matrix_collision_test(position.x, position.y - player_speed*mapped_y, 0)){
+        position.y -= player_speed*mapped_y;
     }
     moving = false;
     if (abs(mapped_x) + abs(mapped_y) > 0.1f){