local monocle = require("#monocle")
local coroutineEntity = monocle.Entity()

function onBegin()
  local level = getLevel()
  disableMovement()
  say("VoiceContest_Museum_OshiroIntro1")
  level:add(coroutineEntity)
  coroutineEntity:add(monocle.Coroutine(celeste.CutsceneEntity.CameraTo(vector2(515, 0), 2.5)))
  coroutineEntity:add(monocle.Coroutine(level:ZoomTo(vector2(160, 100), 1.25, 3.5)))
  coroutineEntity:add(monocle.Coroutine(run(45)))
  jump()
  run(60)
  jump()
  run(90)
  wait(2)
  say("VoiceContest_Museum_OshiroIntro2")
  wait(1)
  setFlag("EpicStartFlag", true)
  wait(3)
  setFlag("EpicStartFlag", false)
  wait(1)
  level:ResetZoom()
end

function onEnd(room, wasSkipped)
  if wasSkipped then
    setFlag("SkippedIntro", true)
  end  
  enableMovement()
  level:ResetZoom()
end