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 MotionSensor
Diff: Entity/Mobs/Headless/Headless.cpp
- Revision:
- 34:1d5b4da3935e
- Parent:
- 33:4f3948dcd2f7
- Child:
- 36:92d131695e7c
--- a/Entity/Mobs/Headless/Headless.cpp Mon May 06 13:27:26 2019 +0000
+++ b/Entity/Mobs/Headless/Headless.cpp Mon May 06 13:58:39 2019 +0000
@@ -24,7 +24,7 @@
velocity = 0.25;
}
-void Headless::move(float player_x, float player_y, int * map, bool * doorways)
+void Headless::move(float player_x, float player_y, char * map, bool * doorways)
{
std::complex<double> pos_diff(player_x - position.x, player_y - position.y); // defining difference in position as a vector
position.x += velocity * pos_diff.real() / std::abs(pos_diff);