Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Enemy/Enemy.cpp
- 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