Mario: enable death from bounce for Goomba

This commit is contained in:
2023-04-08 19:43:36 +02:00
parent b175e58714
commit d41c77ab96
3 changed files with 14 additions and 1 deletions
+6
View File
@@ -7,10 +7,16 @@
void GoombaVisitor::visit(const SDLPP::RenderObject &obj) {
auto id = obj.getId();
auto marioBlock = reinterpret_cast<const MarioBlock&>(obj);
switch (id) {
case FLOOR_ID:
case BRICK_ID:
case BRICK_TOP_ID:
if(marioBlock.isBouncing()) {
bounce = true;
death = true;
return;
}
case PIPE_LEFT_BOTTOM_ID:
case PIPE_RIGHT_BOTTOM_ID:
case PIPE_LEFT_TOP_ID: