local vector2 = require("#microsoft.xna.framework.vector2")
local exCameraHelper = require("#Celeste.Mod.ExCameraDynamics.Code.Module.ExCameraInterop")

function onBegin()
    
    disableMovement()
    disablePause ()

    player.ForceCameraUpdate = true
    runTo (7512, true)
    wait(0.3)
    player.Facing = getEnum("Celeste.Facings", "Left")
    wait(0.5)

    setFlag("sunset",false)
    
    local darkness = getDarkness ()
    while (true) do
        wait(0.01)
        darkness = darkness + 0.1
        setDarkness (darkness)
        if darkness > 0.9 then
            break
        end
    end

    player.ForceCameraUpdate = false

    teleportTo(1253, 3096, "fade_03")
    
    enableMovement()
    enablePause ()
    endCutscene ()

end