Mario: mario detects enemies and bounces when he kills them/dies when they kill him

This commit is contained in:
2021-08-08 21:40:00 +02:00
parent 45ac4dad64
commit 94bf4fc39d
4 changed files with 21 additions and 3 deletions
+5
View File
@@ -100,6 +100,10 @@ public:
_moving_objects.push_back(mushroom);
}
bool shouldBounce() {
return _bounce;
}
private:
bool onGround = false;
double groundY = 0;
@@ -122,6 +126,7 @@ private:
int &_coin_count;
bool mushroom = false;
std::vector< std::shared_ptr< MarioBlock > > &_moving_objects;
bool _bounce = false;
};
#endif