Mochu Yao explorer game

Dependencies:   mbed

Revision:
36:cdfba51a0a44
Parent:
35:3d4dd92bc82b
Child:
37:9e6c56fcc738
diff -r 3d4dd92bc82b -r cdfba51a0a44 Gameengine/Gameengine.cpp
--- a/Gameengine/Gameengine.cpp	Fri May 08 07:49:32 2020 +0000
+++ b/Gameengine/Gameengine.cpp	Wed May 13 08:49:44 2020 +0000
@@ -57,14 +57,15 @@
     _player.set_y_coordinate(X_flag, _jump_height, _y_flag); }  
     _f_flag = _player.get_fall_flag(); 
     _player_y = _player.get_y();
-    _jump_height = _player.get_jump_height(); }
+    _jump_height = _player.get_jump_height();
+    _y_flag = _player.get_y_flag(); }
     
 void Gameengine::set_fall_flag() {
-    if (((set_line_1.right < _player_x) && (_player_x < (set_line_1.left - 5))) && _player_y == 23) {
+    if (((set_line_1.right < _player_x) && (_player_x < (set_line_1.left - 5))) && (_y_flag == 0)) {
           _f_flag = true; }
-    else if (((set_line_2.right < _player_x) && (_player_x < (set_line_2.left - 5))) && _player_y == 23) {
+    else if (((set_line_2.right < _player_x) && (_player_x < (set_line_2.left - 5))) && (_y_flag == 0)) {
           _f_flag = true; }
-    else if (((set_line_3.right < _player_x) && (_player_x < (set_line_3.left - 5))) && _player_y == 23) {
+    else if (((set_line_3.right < _player_x) && (_player_x < (set_line_3.left - 5))) && (_y_flag == 0)) {
           _f_flag = true; }
     else if ((_player_x <= 0) && (_player_x >= 80)) {
           _f_flag = true; }