local vector2 = require("#microsoft.xna.framework.vector2")
local coroutineEntity = monocle.Entity()

function onBegin()
	local room = getRoom()
    room.PauseLock = true
    disableMovement()
	engine.Scene:add(coroutineEntity)
	coroutineEntity:add(monocle.Coroutine(getLevel():ZoomTo(vector2(108, 90), 1.5, 0.1)))
	wait(2.0)
	setFlag("spectacleFade", false)
	setFlag("spectacleFade2", false)
	player.DummyAutoAnimate = false
	coroutine.yield(player.Sprite:Play("wakeUp"))
	wait(2.1)
    player.DummyAutoAnimate = true
	wait(0.6)
	say("SJ2021_SOLOIINI_AUSTERIOUS")
	coroutine.yield(getLevel():ZoomBack(0.5))
    end

function onEnd()
	getLevel():remove(coroutineEntity)
	celeste.Audio.SetMusicParam("dialog", 0.0)
	celeste.Audio.SetMusicParam("piano", 0.5)
    getRoom().PauseLock = false
    enableMovement()
end