Mario: mario detects enemies and bounces when he kills them/dies when they kill him
This commit is contained in:
@@ -53,6 +53,14 @@ void MarioVisitor::visit( const SDLPP::RenderObject &obj ) {
|
||||
death = true;
|
||||
_quit = true;
|
||||
break;
|
||||
case GOOMBA_ID:
|
||||
if(from != MARIO_FLOOR_DETECT && from != MARIO_ENEMY_DETECT) {
|
||||
death = true;
|
||||
_quit = true;
|
||||
} else {
|
||||
_bounce = true;
|
||||
}
|
||||
break;
|
||||
case STOP_MOVEMENT:
|
||||
stop = true;
|
||||
newX = obj.getDoubleRect().first.getX() +
|
||||
|
||||
Reference in New Issue
Block a user