From 5931470800c43260f600303d1231dbaf586f26fc Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 9 Feb 2021 22:28:27 -0500 Subject: Map changing! Also removed some dependencies on the Renderer. More changes need to be made. Fading to black before the change would be good. And making sure the characters are facing the right direction. Maybe that code shouldn't live in Game, either. Later we also want to combine the tilesets for these two maps (and any others that are on Tanetane). --- res/scripts/map1_off_right.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 res/scripts/map1_off_right.lua (limited to 'res/scripts') diff --git a/res/scripts/map1_off_right.lua b/res/scripts/map1_off_right.lua new file mode 100644 index 0000000..026c32e --- /dev/null +++ b/res/scripts/map1_off_right.lua @@ -0,0 +1,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 -- cgit 1.4.1