function onBegin()
    engine.Scene.Session.Dreaming = false
    teleportTo(744, -1448)
    waitUntilOnGround()
    player.ForceCameraUpdate = true
    disableMovement()
    player.DummyAutoAnimate = false
    player.Sprite:Play("asleep", true)
    wait(1)
    player.Sprite:Play("halfWakeUp", true)
    wait(0.4)
    say("CS_ending")
    wait(1.5)
    say("CS_ending_A")
    wait(1)
    say("CS_ending_B")
    wait(1)
    say("CS_ending_C")

    completeArea(true)
end

function onEnd(level, wasSkipped)
    if wasSkipped then
        completeArea(false, true)
    end
end