local DropWipe = require("#celeste.DropWipe")
local fade = nil

function onTalk()
    disableMovement()
    fade = DropWipe(getRoom(), false)
    fade.Duration = 0.5
    fade.EndTimer = 0.5
    coroutine.yield(fade:Wait());

    enableMovement()
    teleportTo(68, 168, "b-01", "Transition")

    fade = DropWipe(getRoom(), true)
    fade.Duration = 0.5
    fade.EndTimer = 0.5
    coroutine.yield(fade:Wait())
end

function onEnd(wasSkipped)
    enableMovement()
    if wasSkipped then
        if fade ~= nil then fade:Cancel() end
        teleportTo(68, 168, "b-01", "Transition")
    end
end