Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.

Dependencies:   mbed FXOS8700CQ mbed-rtos

Committer:
yfkwok
Date:
Wed Apr 03 03:06:00 2019 +0000
Revision:
2:464c7e62d97d
Child:
4:5bc9c4363d31
Date 3/4/2019 - Mini game one beta complete

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yfkwok 2:464c7e62d97d 1 #include "Score.h"
yfkwok 2:464c7e62d97d 2
yfkwok 2:464c7e62d97d 3 Score::Score()
yfkwok 2:464c7e62d97d 4 {
yfkwok 2:464c7e62d97d 5
yfkwok 2:464c7e62d97d 6 }
yfkwok 2:464c7e62d97d 7
yfkwok 2:464c7e62d97d 8 Score::~Score()
yfkwok 2:464c7e62d97d 9 {
yfkwok 2:464c7e62d97d 10
yfkwok 2:464c7e62d97d 11 }
yfkwok 2:464c7e62d97d 12
yfkwok 2:464c7e62d97d 13 void Score::title_music(Gamepad &pad)
yfkwok 2:464c7e62d97d 14 {
yfkwok 2:464c7e62d97d 15 while(1){
yfkwok 2:464c7e62d97d 16 pad.tone(NOTE_G3,0.1);
yfkwok 2:464c7e62d97d 17 wait(0.1);
yfkwok 2:464c7e62d97d 18 pad.tone(NOTE_B3,0.1);
yfkwok 2:464c7e62d97d 19 wait(0.1);
yfkwok 2:464c7e62d97d 20 pad.tone(NOTE_D4,0.1);
yfkwok 2:464c7e62d97d 21 wait(0.1);
yfkwok 2:464c7e62d97d 22 pad.tone(NOTE_FS4,0.1);
yfkwok 2:464c7e62d97d 23 wait(0.1);
yfkwok 2:464c7e62d97d 24 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 25 pad.tone(NOTE_G4,0.4);
yfkwok 2:464c7e62d97d 26 wait(0.4);
yfkwok 2:464c7e62d97d 27 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 28 pad.tone(NOTE_G4,0.4);
yfkwok 2:464c7e62d97d 29 wait(0.4);
yfkwok 2:464c7e62d97d 30 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 31 wait(0.2);
yfkwok 2:464c7e62d97d 32 pad.tone(NOTE_G4,0.1);
yfkwok 2:464c7e62d97d 33 wait(0.1);
yfkwok 2:464c7e62d97d 34 pad.tone(NOTE_G4,0.1);
yfkwok 2:464c7e62d97d 35 wait(0.1);
yfkwok 2:464c7e62d97d 36 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 37 pad.tone(NOTE_G4,0.4);
yfkwok 2:464c7e62d97d 38 wait(0.4);
yfkwok 2:464c7e62d97d 39 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 40 pad.tone(NOTE_G4,0.4);
yfkwok 2:464c7e62d97d 41 wait(0.4);
yfkwok 2:464c7e62d97d 42 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 43 pad.tone(NOTE_G4,0.4);
yfkwok 2:464c7e62d97d 44 wait(0.4);
yfkwok 2:464c7e62d97d 45 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 46 pad.tone(NOTE_F4,0.4/3);
yfkwok 2:464c7e62d97d 47 wait(0.4/3);
yfkwok 2:464c7e62d97d 48 pad.tone(NOTE_F4,0.4/3);
yfkwok 2:464c7e62d97d 49 wait(0.4/3);
yfkwok 2:464c7e62d97d 50 pad.tone(NOTE_F4,0.4/3);
yfkwok 2:464c7e62d97d 51 wait(0.4/3);
yfkwok 2:464c7e62d97d 52 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 53 pad.tone(NOTE_F4,0.4/3);
yfkwok 2:464c7e62d97d 54 wait(0.4/3);
yfkwok 2:464c7e62d97d 55 pad.tone(NOTE_F4,0.4/3);
yfkwok 2:464c7e62d97d 56 wait(0.4/3);
yfkwok 2:464c7e62d97d 57 pad.tone(NOTE_FS4,0.4/3);
yfkwok 2:464c7e62d97d 58 wait(0.4/3);
yfkwok 2:464c7e62d97d 59 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 60
yfkwok 2:464c7e62d97d 61 while(1){
yfkwok 2:464c7e62d97d 62 //bar 4
yfkwok 2:464c7e62d97d 63 pad.tone(NOTE_G4,0.6);
yfkwok 2:464c7e62d97d 64 wait(0.6);
yfkwok 2:464c7e62d97d 65 pad.tone(NOTE_B4,0.2);
yfkwok 2:464c7e62d97d 66 wait(0.2);
yfkwok 2:464c7e62d97d 67 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 68 pad.tone(NOTE_D5,0.8);
yfkwok 2:464c7e62d97d 69 wait(0.8);
yfkwok 2:464c7e62d97d 70 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 71 pad.tone(NOTE_C4,0.6);
yfkwok 2:464c7e62d97d 72 wait(0.6);
yfkwok 2:464c7e62d97d 73 pad.tone(NOTE_F4,0.2);
yfkwok 2:464c7e62d97d 74 wait(0.2);
yfkwok 2:464c7e62d97d 75 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 76 pad.tone(NOTE_F5,0.6);
yfkwok 2:464c7e62d97d 77 wait(0.6);
yfkwok 2:464c7e62d97d 78 pad.tone(NOTE_E5,0.1);
yfkwok 2:464c7e62d97d 79 wait(0.1);
yfkwok 2:464c7e62d97d 80 pad.tone(NOTE_DS5,0.1);
yfkwok 2:464c7e62d97d 81 wait(0.1);
yfkwok 2:464c7e62d97d 82 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 83 //bar 6
yfkwok 2:464c7e62d97d 84 pad.tone(NOTE_D5,0.8);
yfkwok 2:464c7e62d97d 85 wait(0.8);
yfkwok 2:464c7e62d97d 86 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 87 pad.tone(NOTE_F4,0.6);
yfkwok 2:464c7e62d97d 88 wait(0.6);
yfkwok 2:464c7e62d97d 89 pad.tone(NOTE_E4,0.1);
yfkwok 2:464c7e62d97d 90 wait(0.1);
yfkwok 2:464c7e62d97d 91 pad.tone(NOTE_DS4,0.1);
yfkwok 2:464c7e62d97d 92 wait(0.1);
yfkwok 2:464c7e62d97d 93 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 94 pad.tone(NOTE_D4,0.8);
yfkwok 2:464c7e62d97d 95 wait(0.8);
yfkwok 2:464c7e62d97d 96 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 97 pad.tone(NOTE_C4,0.8/3);
yfkwok 2:464c7e62d97d 98 wait(0.8/3);
yfkwok 2:464c7e62d97d 99 pad.tone(NOTE_B3,0.8/3);
yfkwok 2:464c7e62d97d 100 wait(0.8/3);
yfkwok 2:464c7e62d97d 101 pad.tone(NOTE_C4,0.8/3);
yfkwok 2:464c7e62d97d 102 wait(0.8/3);
yfkwok 2:464c7e62d97d 103 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 104 pad.tone(NOTE_G4,0.6);
yfkwok 2:464c7e62d97d 105 wait(0.6);
yfkwok 2:464c7e62d97d 106 pad.tone(NOTE_B4,0.2);
yfkwok 2:464c7e62d97d 107 wait(0.2);
yfkwok 2:464c7e62d97d 108 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 109 pad.tone(NOTE_D5,0.8);
yfkwok 2:464c7e62d97d 110 wait(0.8);
yfkwok 2:464c7e62d97d 111 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 112 pad.tone(NOTE_C4,0.8);
yfkwok 2:464c7e62d97d 113 wait(0.8);
yfkwok 2:464c7e62d97d 114 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 115 pad.tone(NOTE_C5,0.8/3);
yfkwok 2:464c7e62d97d 116 wait(0.8/3);
yfkwok 2:464c7e62d97d 117 pad.tone(NOTE_B4,0.8/3);
yfkwok 2:464c7e62d97d 118 wait(0.8/3);
yfkwok 2:464c7e62d97d 119 pad.tone(NOTE_C5,0.8/3);
yfkwok 2:464c7e62d97d 120 wait(0.8/3);
yfkwok 2:464c7e62d97d 121 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 122 pad.tone(NOTE_D5,0.8);
yfkwok 2:464c7e62d97d 123 wait(0.8);
yfkwok 2:464c7e62d97d 124 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 125 pad.tone(NOTE_F4,0.8/3);
yfkwok 2:464c7e62d97d 126 wait(0.8/3);
yfkwok 2:464c7e62d97d 127 pad.tone(NOTE_E4,0.8/3);
yfkwok 2:464c7e62d97d 128 wait(0.8/3);
yfkwok 2:464c7e62d97d 129 pad.tone(NOTE_C4,0.8/3);
yfkwok 2:464c7e62d97d 130 wait(0.8/3);
yfkwok 2:464c7e62d97d 131 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 132 pad.tone(NOTE_D4,1.0);
yfkwok 2:464c7e62d97d 133 wait(1.0);
yfkwok 2:464c7e62d97d 134 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 135 pad.tone(NOTE_B3,0.2);
yfkwok 2:464c7e62d97d 136 wait(0.2);
yfkwok 2:464c7e62d97d 137 pad.tone(NOTE_C4,0.2);
yfkwok 2:464c7e62d97d 138 wait(0.2);
yfkwok 2:464c7e62d97d 139 pad.tone(NOTE_D4,0.2);
yfkwok 2:464c7e62d97d 140 wait(0.2);
yfkwok 2:464c7e62d97d 141 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 142 //bar 12
yfkwok 2:464c7e62d97d 143 pad.tone(NOTE_G4,0.6);
yfkwok 2:464c7e62d97d 144 wait(0.6);
yfkwok 2:464c7e62d97d 145 pad.tone(NOTE_B4,0.2);
yfkwok 2:464c7e62d97d 146 wait(0.2);
yfkwok 2:464c7e62d97d 147 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 148 pad.tone(NOTE_D5,0.8);
yfkwok 2:464c7e62d97d 149 wait(0.8);
yfkwok 2:464c7e62d97d 150 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 151 pad.tone(NOTE_C4,0.6);
yfkwok 2:464c7e62d97d 152 wait(0.6);
yfkwok 2:464c7e62d97d 153 pad.tone(NOTE_F4,0.2);
yfkwok 2:464c7e62d97d 154 wait(0.2);
yfkwok 2:464c7e62d97d 155 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 156 pad.tone(NOTE_F5,0.6);
yfkwok 2:464c7e62d97d 157 wait(0.6);
yfkwok 2:464c7e62d97d 158 pad.tone(NOTE_E5,0.1);
yfkwok 2:464c7e62d97d 159 wait(0.1);
yfkwok 2:464c7e62d97d 160 pad.tone(NOTE_DS5,0.1);
yfkwok 2:464c7e62d97d 161 wait(0.1);
yfkwok 2:464c7e62d97d 162 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 163 pad.tone(NOTE_D5,0.8);
yfkwok 2:464c7e62d97d 164 wait(0.8);
yfkwok 2:464c7e62d97d 165 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 166 pad.tone(NOTE_F4,0.6);
yfkwok 2:464c7e62d97d 167 wait(0.6);
yfkwok 2:464c7e62d97d 168 pad.tone(NOTE_E4,0.1);
yfkwok 2:464c7e62d97d 169 wait(0.1);
yfkwok 2:464c7e62d97d 170 pad.tone(NOTE_DS4,0.1);
yfkwok 2:464c7e62d97d 171 wait(0.1);
yfkwok 2:464c7e62d97d 172 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 173 pad.tone(NOTE_D4,0.8);
yfkwok 2:464c7e62d97d 174 wait(0.8);
yfkwok 2:464c7e62d97d 175 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 176 pad.tone(NOTE_C4,0.8/3);
yfkwok 2:464c7e62d97d 177 wait(0.8/3);
yfkwok 2:464c7e62d97d 178 pad.tone(NOTE_B3,0.8/3);
yfkwok 2:464c7e62d97d 179 wait(0.8/3);
yfkwok 2:464c7e62d97d 180 pad.tone(NOTE_C4,0.8/3);
yfkwok 2:464c7e62d97d 181 wait(0.8/3);
yfkwok 2:464c7e62d97d 182 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 183 pad.tone(NOTE_G4,0.6);
yfkwok 2:464c7e62d97d 184 wait(0.6);
yfkwok 2:464c7e62d97d 185 pad.tone(NOTE_B4,0.2);
yfkwok 2:464c7e62d97d 186 wait(0.2);
yfkwok 2:464c7e62d97d 187 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 188 pad.tone(NOTE_D5,0.8);
yfkwok 2:464c7e62d97d 189 wait(0.8);
yfkwok 2:464c7e62d97d 190 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 191 //bar 17
yfkwok 2:464c7e62d97d 192 pad.tone(NOTE_C4,0.6);
yfkwok 2:464c7e62d97d 193 wait(0.6);
yfkwok 2:464c7e62d97d 194 pad.tone(NOTE_C4,0.2);
yfkwok 2:464c7e62d97d 195 wait(0.2);
yfkwok 2:464c7e62d97d 196 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 197 pad.tone(NOTE_F5,0.8/3);
yfkwok 2:464c7e62d97d 198 wait(0.8/3);
yfkwok 2:464c7e62d97d 199 pad.tone(NOTE_E5,0.8/3);
yfkwok 2:464c7e62d97d 200 wait(0.8/3);
yfkwok 2:464c7e62d97d 201 pad.tone(NOTE_F5,0.8/3);
yfkwok 2:464c7e62d97d 202 wait(0.8/3);
yfkwok 2:464c7e62d97d 203 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 204 pad.tone(NOTE_G5,0.6);
yfkwok 2:464c7e62d97d 205 wait(0.6);
yfkwok 2:464c7e62d97d 206 pad.tone(NOTE_AS5,0.2);
yfkwok 2:464c7e62d97d 207 wait(0.2);
yfkwok 2:464c7e62d97d 208 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 209 pad.tone(NOTE_G5,0.8);
yfkwok 2:464c7e62d97d 210 wait(0.8);
yfkwok 2:464c7e62d97d 211 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 212 pad.tone(NOTE_G5,0.6);
yfkwok 2:464c7e62d97d 213 wait(0.6);
yfkwok 2:464c7e62d97d 214 pad.tone(NOTE_A4,0.2);
yfkwok 2:464c7e62d97d 215 wait(0.2);
yfkwok 2:464c7e62d97d 216 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 217 pad.tone(NOTE_A5,0.8);
yfkwok 2:464c7e62d97d 218 wait(0.8);
yfkwok 2:464c7e62d97d 219 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 220 pad.tone(NOTE_AS5,0.6);
yfkwok 2:464c7e62d97d 221 wait(0.6);
yfkwok 2:464c7e62d97d 222 pad.tone(NOTE_F5,0.2);
yfkwok 2:464c7e62d97d 223 wait(0.2);
yfkwok 2:464c7e62d97d 224 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 225 pad.tone(NOTE_F5,0.8);
yfkwok 2:464c7e62d97d 226 wait(0.8);
yfkwok 2:464c7e62d97d 227 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 228 pad.tone(NOTE_F5,0.8);
yfkwok 2:464c7e62d97d 229 wait(0.8);
yfkwok 2:464c7e62d97d 230 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 231 pad.tone(NOTE_AS5,0.4);
yfkwok 2:464c7e62d97d 232 wait(0.4);
yfkwok 2:464c7e62d97d 233 pad.tone(NOTE_B5,0.4);
yfkwok 2:464c7e62d97d 234 wait(0.4);
yfkwok 2:464c7e62d97d 235 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 236 pad.tone(NOTE_C6,0.6);
yfkwok 2:464c7e62d97d 237 wait(0.6);
yfkwok 2:464c7e62d97d 238 pad.tone(NOTE_G5,0.2);
yfkwok 2:464c7e62d97d 239 wait(0.2);
yfkwok 2:464c7e62d97d 240 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 241 pad.tone(NOTE_G5,0.8);
yfkwok 2:464c7e62d97d 242 wait(0.8);
yfkwok 2:464c7e62d97d 243 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 244 //bar 23
yfkwok 2:464c7e62d97d 245 pad.tone(NOTE_G5,0.8);
yfkwok 2:464c7e62d97d 246 wait(0.8);
yfkwok 2:464c7e62d97d 247 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 248 pad.tone(NOTE_C6,0.4);
yfkwok 2:464c7e62d97d 249 wait(0.4);
yfkwok 2:464c7e62d97d 250 pad.tone(NOTE_CS6,0.4);
yfkwok 2:464c7e62d97d 251 wait(0.4);
yfkwok 2:464c7e62d97d 252 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 253 pad.tone(NOTE_D6,0.3);
yfkwok 2:464c7e62d97d 254 wait(0.3);
yfkwok 2:464c7e62d97d 255 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 256 wait(0.1);
yfkwok 2:464c7e62d97d 257 wait(0.3);
yfkwok 2:464c7e62d97d 258 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 259 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 260 wait(0.1);
yfkwok 2:464c7e62d97d 261 wait(0.3);
yfkwok 2:464c7e62d97d 262 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 263 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 264 wait(0.1);
yfkwok 2:464c7e62d97d 265 wait(0.3);
yfkwok 2:464c7e62d97d 266 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 267 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 268 wait(0.1);
yfkwok 2:464c7e62d97d 269 wait(0.3);
yfkwok 2:464c7e62d97d 270 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 271 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 272 wait(0.1);
yfkwok 2:464c7e62d97d 273 wait(0.3);
yfkwok 2:464c7e62d97d 274 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 275 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 276 wait(0.1);
yfkwok 2:464c7e62d97d 277 pad.tone(NOTE_C6,0.8/3);
yfkwok 2:464c7e62d97d 278 wait(0.8/3);
yfkwok 2:464c7e62d97d 279 pad.tone(NOTE_C6,0.8/3);
yfkwok 2:464c7e62d97d 280 wait(0.8/3);
yfkwok 2:464c7e62d97d 281 pad.tone(NOTE_CS6,0.8/3);
yfkwok 2:464c7e62d97d 282 wait(0.8/3);
yfkwok 2:464c7e62d97d 283 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 284 pad.tone(NOTE_D6,0.3);
yfkwok 2:464c7e62d97d 285 wait(0.3);
yfkwok 2:464c7e62d97d 286 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 287 wait(0.1);
yfkwok 2:464c7e62d97d 288 wait(0.3);
yfkwok 2:464c7e62d97d 289 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 290 wait(0.1);
yfkwok 2:464c7e62d97d 291 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 292 wait(0.3);
yfkwok 2:464c7e62d97d 293 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 294 wait(0.1);
yfkwok 2:464c7e62d97d 295 wait(0.3);
yfkwok 2:464c7e62d97d 296 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 297 wait(0.1);
yfkwok 2:464c7e62d97d 298 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 299 wait(0.3);
yfkwok 2:464c7e62d97d 300 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 301 wait(0.1);
yfkwok 2:464c7e62d97d 302 wait(0.3);
yfkwok 2:464c7e62d97d 303 pad.tone(NOTE_D5,0.1);
yfkwok 2:464c7e62d97d 304 wait(0.1);
yfkwok 2:464c7e62d97d 305 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 306 pad.tone(NOTE_C6,0.8/3);
yfkwok 2:464c7e62d97d 307 wait(0.8/3);
yfkwok 2:464c7e62d97d 308 pad.tone(NOTE_C6,0.8/3);
yfkwok 2:464c7e62d97d 309 wait(0.8/3);
yfkwok 2:464c7e62d97d 310 pad.tone(NOTE_B5,0.8/3);
yfkwok 2:464c7e62d97d 311 wait(0.8/3);
yfkwok 2:464c7e62d97d 312 if(pad.check_event(Gamepad::START_PRESSED) == true){break;}
yfkwok 2:464c7e62d97d 313 }
yfkwok 2:464c7e62d97d 314
yfkwok 2:464c7e62d97d 315 break;
yfkwok 2:464c7e62d97d 316 }
yfkwok 2:464c7e62d97d 317 }
yfkwok 2:464c7e62d97d 318
yfkwok 2:464c7e62d97d 319 void Score::level_up(Gamepad &pad)
yfkwok 2:464c7e62d97d 320 {
yfkwok 2:464c7e62d97d 321 pad.tone(NOTE_E5,0.12);
yfkwok 2:464c7e62d97d 322 wait(0.15);
yfkwok 2:464c7e62d97d 323 pad.tone(NOTE_E5,0.12);
yfkwok 2:464c7e62d97d 324 wait(0.15);
yfkwok 2:464c7e62d97d 325 pad.tone(NOTE_E5,0.12);
yfkwok 2:464c7e62d97d 326 wait(0.15);
yfkwok 2:464c7e62d97d 327 pad.tone(NOTE_B5,0.45);
yfkwok 2:464c7e62d97d 328 wait(0.45);
yfkwok 2:464c7e62d97d 329 }
yfkwok 2:464c7e62d97d 330
yfkwok 2:464c7e62d97d 331 void Score::congrats(Gamepad &pad)
yfkwok 2:464c7e62d97d 332 {
yfkwok 2:464c7e62d97d 333 pad.tone(NOTE_A5,0.35);
yfkwok 2:464c7e62d97d 334 wait(0.35);
yfkwok 2:464c7e62d97d 335 pad.tone(NOTE_F5,0.35);
yfkwok 2:464c7e62d97d 336 wait(0.35);
yfkwok 2:464c7e62d97d 337 pad.tone(NOTE_C5,0.7);
yfkwok 2:464c7e62d97d 338 wait(0.7);
yfkwok 2:464c7e62d97d 339 pad.tone(NOTE_AS5,0.35/3);
yfkwok 2:464c7e62d97d 340 wait(0.35/3);
yfkwok 2:464c7e62d97d 341 pad.tone(NOTE_AS5,0.35/3);
yfkwok 2:464c7e62d97d 342 wait(0.35/3);
yfkwok 2:464c7e62d97d 343 pad.tone(NOTE_AS5,0.35/3);
yfkwok 2:464c7e62d97d 344 wait(0.35/3);
yfkwok 2:464c7e62d97d 345 pad.tone(NOTE_G5,0.35/3);
yfkwok 2:464c7e62d97d 346 wait(0.35/3);
yfkwok 2:464c7e62d97d 347 pad.tone(NOTE_G5,0.35/3);
yfkwok 2:464c7e62d97d 348 wait(0.35/3);
yfkwok 2:464c7e62d97d 349 pad.tone(NOTE_AS5,0.35/3);
yfkwok 2:464c7e62d97d 350 wait(0.35/3);
yfkwok 2:464c7e62d97d 351 pad.tone(NOTE_A5,0.7);
yfkwok 2:464c7e62d97d 352 wait(0.7);
yfkwok 2:464c7e62d97d 353 }
yfkwok 2:464c7e62d97d 354
yfkwok 2:464c7e62d97d 355 void Score::coin(Gamepad &pad)
yfkwok 2:464c7e62d97d 356 {
yfkwok 2:464c7e62d97d 357 pad.tone(NOTE_B5,0.1);
yfkwok 2:464c7e62d97d 358 wait(0.1);
yfkwok 2:464c7e62d97d 359 pad.tone(NOTE_E6,0.4);
yfkwok 2:464c7e62d97d 360 }