Mochu Yao explorer game
Dependencies: mbed
Diff: explorer/explorer.cpp
- Revision:
- 36:cdfba51a0a44
- Parent:
- 34:66e37a0d59c3
- Child:
- 37:9e6c56fcc738
--- a/explorer/explorer.cpp Fri May 08 07:49:32 2020 +0000 +++ b/explorer/explorer.cpp Wed May 13 08:49:44 2020 +0000 @@ -107,6 +107,7 @@ void Explorer::set_y_coordinate(bool ifjump, int jump_height, int y_flag) { _jump_height = jump_height; + _y_flag = y_flag; if (ifjump && _jump_height < 40) { _jump_height = 30; } if (_jump_height !=0) _speed--; // Keep falling until not jumping. @@ -141,6 +142,10 @@ int Explorer::get_speed() { return _speed; } + +int Explorer::get_y_flag() { + return _y_flag; +} int Explorer::get_jump_height() { return _jump_height;