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: Floors/Floors.cpp
- Revision:
- 33:de130e274391
- Parent:
- 31:5c4acae51026
- Child:
- 34:a9b14a4ccd46
--- a/Floors/Floors.cpp Thu May 09 11:21:53 2019 +0000
+++ b/Floors/Floors.cpp Thu May 09 11:39:59 2019 +0000
@@ -44,7 +44,7 @@
put_enemy = false;
}
}
- if (_doodler_pos_y < 13) { // shift floors once doodler reaches this value on the screen
+ if (_doodler_pos_y < 16) { // shift floors once doodler reaches this value on the screen
// I chose this value because testing with the doodler's jump, it allows the doodler to keep jumping on a floor
// without it moving down and dissapearing
_position.y += 1;
@@ -76,21 +76,10 @@
}
}
-Vector2D Floors::get_position()
-{
- Vector2D p = {_position.x,_position.y};
- return p;
-}
+Vector2D Floors::get_position() { Vector2D p = {_position.x,_position.y}; return p; }
-void Floors::set_position(Vector2D pos)
-{
- _position.x = pos.x;
- _position.y = pos.y;
-}
+void Floors::set_position(Vector2D pos) { _position.x = pos.x; _position.y = pos.y; }
// The get_end_game function can be called in the engine to check if the game should end or not (if the doodler has collided
// with the enemy)
-bool Floors::get_end_game()
-{
- return end_game;
-}
\ No newline at end of file
+bool Floors::get_end_game() { return end_game; }
\ No newline at end of file