local monocle = require("#monocle")

local coroutineEntity = monocle.Entity()

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

function onBegin()
  disableMovement()
  player.ForceCameraUpdate = false
  engine.Scene:NextColorGrade("Donker19/LackOfInsiration/A_HighContrastBrightness")
  wait(0.5)
  coroutine.yield(celeste.CutsceneEntity.CameraTo(vector2(player.Position.X-32, player.Position.Y - 3000), 7, monocle.Ease.SineInOut))
  wait(1.5)
  coroutine.yield(celeste.CutsceneEntity.CameraTo(vector2(player.Position.X-32, player.Position.Y - 120), 9, monocle.Ease.SineInOut))
  say("donk_OrionsBeltCh3_FinalAscent")
  wait(1)
  setFlag("donk_TimerStart_IcePlanet", true)


  enableMovement()
end

function onEnd(room, wasSkipped)
  enableMovement()
  setFlag("donk_TimerStart_IcePlanet", true)
  player.DummyAutoAnimate = true
  player.ForceCameraUpdate = true
  getLevel():ResetZoom()
  enableMovement()
end