Handle transitions between levels.