SharpShooter
Dependencies: 4DGL-uLCD-SE SDFileSystem mbed-rtos mbed wave_player
Diff: Shooter.h
- Revision:
- 15:e09ab0d14d4b
- Parent:
- 12:2f358065ba3f
--- a/Shooter.h Sat Oct 29 20:02:57 2016 +0000 +++ b/Shooter.h Mon Oct 31 18:15:21 2016 +0000 @@ -1,5 +1,6 @@ extern uLCD_4DGL uLCD; extern Mutex mutex; +extern wave_player waver; class Shooter { @@ -39,6 +40,11 @@ if (x==104) x = 64; Shooter::drawShooter(); mutex.unlock(); + + FILE *wave_file; + wave_file=fopen("/sd/wavfiles/move.wav","r"); + waver.play(wave_file); + fclose(wave_file); } void Shooter::moveRight() { @@ -49,6 +55,11 @@ if (x==24) x = 64; Shooter::drawShooter(); mutex.unlock(); + + FILE *wave_file; + wave_file=fopen("/sd/wavfiles/move.wav","r"); + waver.play(wave_file); + fclose(wave_file); } int Shooter::getLocation() {