summary refs log tree commit diff stats
path: root/res/scripts/map1_off_right.lua
blob: 026c32e8dbd16464ff553c67d1f678b64b178262 (plain) (blame)
1
2
3
4
5
6
7
8
9
function map1_off_right()
  -- Because this script gets triggered within the CharacterSystem's tick method,
  -- if we immediately cleared out the entities from the old map, we might end up
  -- returning there and processing stale data. This yield here ensures that we
  -- are no longer in the CharacterSystem, because processing gets picked back up
  -- in the ScriptSystem.
  coroutine.yield()
  loadMap("../res/maps/map2.tmx", "fromLeft")
end