
function onBegin()
	disableMovement()
    playSound("event:/char/badeline/disappear")
	player.DummyAutoAnimate = false
	player.Sprite:Play("roll")
	player.ForceCameraUpdate = true;
    wait(0.05)
    player.Speed = vector2(500, -50)
    wait(0.05)
    player.Speed = vector2(350, 50)
    wait(0.05)
    player.Speed = vector2(200, 100)
    wait(0.05)
    player.Speed = vector2(150, 200)
    wait(0.05)

	waitUntilOnGround()
    	playSound("event:/game/06_reflection/badeline_pull_impact")
	
	wait(0.5)
	
	player.Sprite:Play("rollGetUp")
	wait(0.8)
end

function onEnd(room, wasSkipped)
	if wasSkipped then
        player.Sprite:Play("idle")
        instantTeleportTo(220, 210)
	    player.DummyAutoAnimate = true
	    player.ForceCameraUpdate = false;
	end

	player.Speed = vector2(0, 0);
	player.DummyAutoAnimate = true
	player.ForceCameraUpdate = false;
	enableMovement()
end

