Mario: end of level logic

This commit is contained in:
2022-09-23 16:46:50 +02:00
parent 6211e8c756
commit 3437aa6b47
8 changed files with 88 additions and 23 deletions
+10
View File
@@ -108,6 +108,14 @@ public:
return _bounce;
}
bool levelEnd() {
return _end;
}
const SDLPP::Vec2D<double> &getEndPos() {
return endPos;
}
private:
bool onGround = false;
double groundY = 0;
@@ -130,6 +138,8 @@ private:
bool mushroom = false;
std::vector<std::shared_ptr<MarioBlock>> &_moving_objects;
bool _bounce = false;
bool _end = false;
SDLPP::Vec2D<double> endPos;
};
#endif