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: Animation/Animation.cpp
- Revision:
- 7:b54323241435
- Parent:
- 6:33fd1797beb4
- Child:
- 8:c3cf8d1057bb
diff -r 33fd1797beb4 -r b54323241435 Animation/Animation.cpp
--- a/Animation/Animation.cpp Mon May 01 22:47:46 2017 +0000
+++ b/Animation/Animation.cpp Tue May 02 00:20:44 2017 +0000
@@ -126,18 +126,21 @@
}
}
-void Animation::finish(N5110 &lcd, intVector2D finish_position)
+void Animation::finish(N5110 &lcd, intVector2D finish_position, Gamepad &pad, bool soundOn)
{
lcd.setPixel(finish_position.x + 3, finish_position.y + 2, false);
lcd.refresh();
+ if (soundOn) pad.tone(523.25f,0.1f);
wait(0.1);
lcd.setPixel(finish_position.x + 3, finish_position.y + 1, false);
lcd.refresh();
+ if (soundOn) pad.tone(659.25f,0.1f);
wait(0.1);
lcd.setPixel(finish_position.x + 3, finish_position.y, false);
lcd.refresh();
+ if (soundOn) pad.tone(784.0f,0.1f);
wait(0.1);
lcd.setPixel(finish_position.x + 3, finish_position.y - 1, false);
@@ -150,6 +153,7 @@
lcd.setPixel(finish_position.x, finish_position.y + 1, false);
lcd.setPixel(finish_position.x, finish_position.y + 2, false);
lcd.refresh();
+ if (soundOn) pad.tone(1046.5f,0.1f);
wait(0.1);
lcd.setPixel(finish_position.x + 1, finish_position.y, false);