local monocle = require("#monocle")

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

function onBegin()
  disableMovement()
  makeUnskippable()
  disableRetry()
  player.ForceCameraUpdate = false
  player.DummyAutoAnimate = false
  player.Sprite:Play("sitDown", false)
 coroutine.yield(getLevel():ZoomTo(vector2(160, 90), 1.6, 0.1))
  wait(4)
  say("Epilogue_MadelineAreYouThere")
  wait(2)
  engine.Scene:NextColorGrade("none")
  wait(1)
  wait(1)
  player.DummyAutoAnimate = true
  walkTo(135, false, 0.5, false)
  wait(1)
  say("Epilogue_YesIAm")
  wait(1)
  coroutine.yield(engine.Scene:ZoomBack(0.75))
  walkTo(142, false, 0.5, false)
  wait(2)
  engine.Scene:NextColorGrade("Donker19/LackOfInsiration/0_BlackFade")
  wait(3)
  say("Epilogue_PhoneCall")
  wait(3)
  completeArea(True, False, True)
end

function onEnd(room, wasSkipped)
  enableMovement()
  completeArea(True, False, True)
  player.DummyAutoAnimate = true
  player.ForceCameraUpdate = true
  getLevel():ResetZoom()
  enableMovement()
end