contains my game for the embedded systems project 2645
Dependencies: mbed FXOS8700CQQQ
GameTones/GameTones.cpp
- Committer:
- OmarAlebiary
- Date:
- 2019-04-24
- Revision:
- 28:39607fb67e88
- Child:
- 29:e660274d8222
File content as of revision 28:39607fb67e88:
#include "GameTones.h" GameTones::GameTones(){ } void GameTones::End_Game_Melody(Gamepad &pad){ pad.tone(300,1);//makes a tone to indicate gameover wait(0.25); pad.tone(450,1);//makes a tone to indicate gameover wait(0.25); pad.tone(300,1);//makes a tone to indicate gameover wait(0.5); pad.tone(450,1);//makes a tone to indicate gameover wait(0.25); pad.tone(300,1);//makes a tone to indicate gameover wait(1); } void GameTones::Play_Welcome_Melody(Gamepad &pad) { pad.tone(500, 1);//plays a tone at frequency 500hz wait(0.5); pad.tone(300, 2); //plays a tone at frequency 300hz wait(0.5); pad.tone(400, 2); //plays a tone at frequency 400hz wait(1.5); pad.tone(450, 0.2);//plays a tone at frequency 450hz wait(0.25); pad.tone(400, 0.2); //plays a tone at frequency 400hz wait(1); }