Mario: proper position when standing on ground
This commit is contained in:
@@ -6,12 +6,14 @@ void MarioVisitor::visit( const SDLPP::RenderObject &obj ) {
|
||||
auto id = obj.getId();
|
||||
switch ( id ) {
|
||||
case FLOOR_ID:
|
||||
if ( from == MARIO_FLOOR_DETECT )
|
||||
if ( from == MARIO_FLOOR_DETECT ) {
|
||||
onGround = true;
|
||||
else if ( from == MARIO_LEFT_SIDE_DETECT )
|
||||
groundY = obj.getPos().getY();
|
||||
} else if ( from == MARIO_LEFT_SIDE_DETECT ) {
|
||||
left = true;
|
||||
else if (from == MARIO_RIGHT_SIDE_DETECT )
|
||||
} else if (from == MARIO_RIGHT_SIDE_DETECT ) {
|
||||
right = true;
|
||||
}
|
||||
break;
|
||||
case DEATH_ID:
|
||||
death = true;
|
||||
|
||||
Reference in New Issue
Block a user