Mario: enable death from bounce for Goomba
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user