![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
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
Diff: main.cpp
- Revision:
- 22:f8f36e88b2ca
- Parent:
- 21:704d938acf5d
- Child:
- 23:4a070960817a
--- a/main.cpp Sun Apr 28 18:04:23 2019 +0000 +++ b/main.cpp Sun Apr 28 18:58:10 2019 +0000 @@ -128,6 +128,7 @@ if(pad.check_event(Gamepad::A_PRESSED) == true){ select = start.get_select(start.update_select(pad)); start.intro(select, pad, lcd); + pad.init_input(); } wait(1.0f/fps); } @@ -144,6 +145,7 @@ } game_1.intro(pad, lcd); currentGame = SQUIRTLE; + pad.init_input(); } else if(select == 0){ music.congrats(pad, lcd, select, year); @@ -155,7 +157,9 @@ lcd.refresh(); wait(0.3); } - currentGame = BULBASAUR;} + currentGame = BULBASAUR; + pad.init_input(); + } else if(select == 2){ music.congrats(pad, lcd, select, year); while(pad.check_event(Gamepad::A_PRESSED) == false){ @@ -166,7 +170,9 @@ lcd.refresh(); wait(0.3); } - currentGame = CHARMANDER;} + currentGame = CHARMANDER; + pad.init_input(); + } break; // Game loop for Bulbasaur's mini game @@ -566,7 +572,7 @@ void year_one_set() { - game_1_speed = 9; + game_1_speed = 7; game_1_cha = 1; game_1_r = 5; game_2_speed = 1; @@ -675,7 +681,7 @@ game_1_speed = 14; game_1_cha = 3; game_1_r = 2; - game_2_speed = 3; + game_2_speed = 2; game_2_cha = 3; game_2_r = 3; }