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

function onBegin()
    
    disableMovement()
    disablePause ()
    
    local level = getLevel()
    coroutine.yield(exCameraHelper.Level_ZoomToFocus(level, vector2(3968, 3058), 1, 0.01))

    setFlag("sunset",true)
    
    local darkness = getDarkness()
    while (true) do
        wait(0.01)
        darkness = darkness - 0.1
        setDarkness (darkness)
        if darkness < 0.1 then
            break
        end
    end
    
    enableMovement()
    enablePause ()
    endCutscene ()

end