diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-10 12:11:27 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-10 12:11:27 -0500 |
| commit | 31dc0e443efc0aae48e11a0d98e699dbed5c7dcf (patch) | |
| tree | 17e044698531fc1af82dddcbd144ae93d3ae0252 /res/scripts/map1_off_right.lua | |
| parent | fb58cb31804da7e5e40fc861927060a183962441 (diff) | |
| download | tanetane-31dc0e443efc0aae48e11a0d98e699dbed5c7dcf.tar.gz tanetane-31dc0e443efc0aae48e11a0d98e699dbed5c7dcf.tar.bz2 tanetane-31dc0e443efc0aae48e11a0d98e699dbed5c7dcf.zip | |
Added fade out around map change
Also moved script system first in the loop so that the camera can catch up before rendering. Also added a map change from map 2 back to map 1.
Diffstat (limited to 'res/scripts/map1_off_right.lua')
| -rw-r--r-- | res/scripts/map1_off_right.lua | 8 |
1 files changed, 1 insertions, 7 deletions
| diff --git a/res/scripts/map1_off_right.lua b/res/scripts/map1_off_right.lua index 026c32e..7dd0113 100644 --- a/res/scripts/map1_off_right.lua +++ b/res/scripts/map1_off_right.lua | |||
| @@ -1,9 +1,3 @@ | |||
| 1 | function map1_off_right() | 1 | function map1_off_right() |
| 2 | -- Because this script gets triggered within the CharacterSystem's tick method, | 2 | ChangeMap("map2", "fromLeft") |
| 3 | -- if we immediately cleared out the entities from the old map, we might end up | ||
| 4 | -- returning there and processing stale data. This yield here ensures that we | ||
| 5 | -- are no longer in the CharacterSystem, because processing gets picked back up | ||
| 6 | -- in the ScriptSystem. | ||
| 7 | coroutine.yield() | ||
| 8 | loadMap("../res/maps/map2.tmx", "fromLeft") | ||
| 9 | end | 3 | end |
