Mario: check before bouncing

This commit is contained in:
2021-05-26 18:24:09 +02:00
parent 734b0b58cb
commit 6e61eb03b9
6 changed files with 56 additions and 2 deletions
+14
View File
@@ -38,3 +38,17 @@ void MarioVisitor::visit( const SDLPP::RenderObject &obj ) {
break;
}
}
void BounceVisitor::visit( const SDLPP::RenderObject &obj ) {
auto id = obj.getId();
switch ( id ) {
case FLOOR_ID:
case BRICK_ID:
case BRICK_TOP_ID:
if(from == 69) {
hits += 1;
}
default:
break;
}
}