ELEC2645 (2018/19) / Mbed 2 deprecated el17dg

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

Revision:
39:ca77a6d574e6
Parent:
31:becb8f6bf7b7
diff -r ef3968546d36 -r ca77a6d574e6 tutorial/tutorial.cpp
--- a/tutorial/tutorial.cpp	Tue May 07 10:40:26 2019 +0000
+++ b/tutorial/tutorial.cpp	Tue May 07 15:20:16 2019 +0000
@@ -11,6 +11,8 @@
 
 GameObject arrowLeft;
 GameObject arrowRight;
+GameObject smallStar;
+GameObject mediumStar;
 
 /**@brief
   * This function just displays some strings of the dysplaye to tell the player
@@ -31,10 +33,12 @@
     else if (current_page == 8){ tutorialPage8();}
     else if (current_page == 9){ tutorialPage9();}
     else if (current_page == 10){ tutorialPage10();}
+    else if (current_page == 11){ tutorialPage11();}
     
     bool back_to_menu = false;    
     if (gamepad.check_event(gamepad.B_PRESSED)){
         gamepad.check_event(gamepad.B_PRESSED);
+        gamepad.check_event(gamepad.A_PRESSED);
         back_to_menu = true; 
     }
     return back_to_menu;   
@@ -49,6 +53,10 @@
     arrowLeft.pos.y = arrows_pos_y;
     arrowRight.pos.x = right_arrow_pos_x;
     arrowRight.pos.y = arrows_pos_y;
+    smallStar.pos.x = 10;
+    smallStar.pos.y = 10;
+    mediumStar.pos.x = 10;
+    mediumStar.pos.y = 15;
   
     drawSprite(arrowRight.pos, tutorial_arrow_right_sprite);
     drawSprite(arrowLeft.pos, tutorial_arrow_left_sprite);
@@ -140,6 +148,15 @@
 }
 
 void Tutorial::tutorialPage10(){
+    drawSprite(smallStar.pos, small_star_sprite);
+    drawSprite(mediumStar.pos, medium_star_sprite);
+    lcd.printString("S Star",20,1);
+    lcd.printString("M Star ",20,2);
+    lcd.printString("They do not  ",0,3);
+    lcd.printString("hurt you ",30,4);
+}
+
+void Tutorial::tutorialPage11(){
     lcd.printString("Good Luck!!! ",0,3);
 }