
function onBegin()
	disableMovement()
	player.ForceCameraUpdate = true;
	waitUntilOnGround()
	run(-135)
	player.DummyAutoAnimate = false
	player.Sprite:Play("roll")
    wait(0.05)
    player.Speed = vector2(-500, 0)
    wait(0.05)
    player.Speed = vector2(-500, 0)
    wait(0.05)
    player.Speed = vector2(-500, 0)
    wait(0.05)
    player.Speed = vector2(-350, 50)
    wait(0.05)
    player.Speed = vector2(-350, 50)
    wait(0.05)
    player.Speed = vector2(-350, 50)
    wait(0.05)
    player.Speed = vector2(-200, 150)
    wait(0.05)
    player.Speed = vector2(-200, 150)
    wait(0.05)
    player.Speed = vector2(-200, 150)
    wait(0.05)
    player.Speed = vector2(-50, 300)
    wait(0.05)
    player.Speed = vector2(-50, 300)
    wait(0.05)
    player.Speed = vector2(-50, 300)
    wait(0.1)


	waitUntilOnGround()
    	playSound("event:/game/06_reflection/badeline_pull_impact")
	
	wait(0.7)
	
	player.Sprite:Play("rollGetUp")
	wait(1)
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

