Mario: check before bouncing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user