local spotlight = require("#Celeste.SpotlightWipe")
local screenwipe = require("#Celeste.ScreenWipe")

function onBegin()
  if not (getFlag("start")) then
    disableMovement()
    disableRetry()
    wait(4)

    spotlight.FocusPoint = player.Position - getRoom().Camera.Position
    local wipe = spotlight(getRoom(), false)
    wipe.Duration = 2
    wait(wipe.Duration)

    teleportTo(-200,-1700,"x-intro_tentB","None")
    setFlag("start", true)
  end
end

function onEnd()
  teleportTo(-200,-1700,"x-intro_tentB","None")
  setFlag("start", true)
  enableMovement()
  enableRetry()
end