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: Skateboarder/Stakeboarder.cpp
- Revision:
- 29:bdc4138b5171
- Parent:
- 28:be77ad6c0bda
diff -r be77ad6c0bda -r bdc4138b5171 Skateboarder/Stakeboarder.cpp --- a/Skateboarder/Stakeboarder.cpp Tue May 07 08:39:38 2019 +0000 +++ b/Skateboarder/Stakeboarder.cpp Tue May 07 17:21:00 2019 +0000 @@ -130,12 +130,13 @@ float joy_x, int moving_counter, Skate_direction direction, - float joy_y) { + float joy_y) { + // Set up the new x coord and use that to set the sprite. _skate_direction = direction; _moving_counter = moving_counter; process_x_variables(joy_x); _x = 40 + 0.4*_moving_counter; // Moving counter is scaled for speed control. - check_duck(joy_y); + check_duck(joy_y); // Needed to overwrite sprite if ducking. } void Skateboarder::process_x_variables(float joy_x) {