ELEC2645 (2018/19) / Mbed 2 deprecated el17m2h_public

Dependencies:   mbed

Revision:
33:de130e274391
Parent:
31:5c4acae51026
Child:
37:71f2cd073739
--- a/Enemy/Enemy.cpp	Thu May 09 11:21:53 2019 +0000
+++ b/Enemy/Enemy.cpp	Thu May 09 11:39:59 2019 +0000
@@ -31,14 +31,7 @@
     lcd.drawSprite(_position.x, _position.y, 12, 12,(int*)image);
 }
 
-void Enemy::erase()  // decides if it gets erased
-{
-    _position.x = 90;  // the ghost's is no longer shown on the screen
-    _position.y = 50;
-}
+// Called in floors file if enemy is meant to get erased (moves the ghost out of the screen's visibility
+void Enemy::erase(){ _position.x = 90; _position.y = 50; }
 
-Vector2D Enemy::get_position()
-{
-    Vector2D p = {_position.x,_position.y};
-    return p;
-}
\ No newline at end of file
+Vector2D Enemy::get_position(){ Vector2D p = {_position.x,_position.y}; return p; }
\ No newline at end of file