Mario: detect left/right collision

This commit is contained in:
2021-04-29 12:33:31 +02:00
parent e8e9e12b58
commit b611e2479a
5 changed files with 19 additions and 11 deletions
+4 -2
View File
@@ -8,8 +8,10 @@ void MarioVisitor::visit( const SDLPP::RenderObject &obj ) {
case FLOOR_OVERWORLD_ID:
if ( from == MARIO_FLOOR_DETECT )
onGround = true;
else if ( from == MARIO_SIDE_DETECT )
stop = true;
else if ( from == MARIO_LEFT_SIDE_DETECT )
left = true;
else if (from == MARIO_RIGHT_SIDE_DETECT )
right = true;
break;
case DEATH_ID:
death = true;