ELEC2645 (2018/19) / Mbed 2 deprecated el17m2h_public

Dependencies:   mbed

Revision:
31:5c4acae51026
Parent:
30:863565e9859f
Child:
33:de130e274391
--- a/Enemy/Enemy.cpp	Thu May 09 08:59:39 2019 +0000
+++ b/Enemy/Enemy.cpp	Thu May 09 10:15:20 2019 +0000
@@ -7,8 +7,8 @@
 }
 void Enemy::update(Vector2D floor_pos)  // sets its position
 {
-    _position.x = floor_pos.x + 7 - 6; // the + 7 for the centre of the floor and the + 6 for the centre of the ghost
-    _position.y = floor_pos.y - 2 - 13; // the - 2 is so that it is on top of the floor's position 
+    _position.x = floor_pos.x + 7 - 6;  // the + 7 for the centre of the floor and the + 6 for the centre of the ghost
+    _position.y = floor_pos.y - 1 - 13;  // the - 1 is so that it is on top of the floor's position
     // and the + 15 is so that it considers the position of the feet of the ghost (not the top)
 }
 
@@ -33,7 +33,7 @@
 
 void Enemy::erase()  // decides if it gets erased
 {
-    _position.x = 90; // the ghost's is no longer shown on the screen
+    _position.x = 90;  // the ghost's is no longer shown on the screen
     _position.y = 50;
 }