Mochu Yao explorer game

Dependencies:   mbed

Revision:
8:201ef0618b7d
Parent:
7:88c4ba6bb37b
Child:
10:559487aac60e
--- a/explorer/explorer.h	Thu Apr 23 07:49:39 2020 +0000
+++ b/explorer/explorer.h	Mon Apr 27 08:41:29 2020 +0000
@@ -11,8 +11,9 @@
 
 #include "mbed.h"
 #include "Gamepad.h"
+#include "surface.h"
 //use the enum to define the value we need for the explorer
-enum explorer_sprite{Move_right,Move_left,Stand_left, Stand_right};
+enum Explorer_sprite {Move_right,Move_left,Stand_left, Stand_right};
 //we have four sprite form so we can define the sprite on the screen by using these enum
 //the explorer's direction
 enum Player_direction {right,left};
@@ -23,8 +24,9 @@
  //Constructor
  ~Explorer();
  //Destructor
+void init();
 void set_x_coordinate(float joy_x, int speed, Player_direction direction);
-void set_y_coordinate(bool ifjump, int jump_height, int level);
+void set_y_coordinate(bool ifjump, int jump_height);
 int get_y();
  
 int get_x();
@@ -35,14 +37,14 @@
 
 Player_direction get_direction();
 
-explorer_sprite get_explorer_sprite();
+Explorer_sprite get_explorer_sprite();
 
-int * get_form(explorer_sprite sprite);
+int * get_form(Explorer_sprite sprite);
 //this function is used to get the players form and print on the screen (same as the item file)
 
 void fall(bool f_flag, Gamepad &gamepad);
 //the fall flag need to add music to hint the player that the game is over
-void reset_flag(bool reset_flag,Gamepad &gamepad);
+void reset_flag(bool flag,Gamepad &gamepad);
 //the reset flag also need to add music to hint the player that the game has been reseted
 bool get_fall_flag();
 
@@ -53,11 +55,16 @@
   int _x;
   int _y;
   int _speed;
-  int _level;
   int _jump_height;
   bool _f_flag;
   bool _r_flag;
+  Line _line_1;
+  Line _line_2;
+  Line _line_3;
+  Line _line_4;
+  Line _line_5;
+  Line _line_6;
   Player_direction _player_direction;
-  explorer_sprite _explorer_sprite;   
+  Explorer_sprite _explorer_sprite;   
 };
 #endif