diff options
author | rom <romangraef@gmail.com> | 2021-04-27 02:48:39 +0200 |
---|---|---|
committer | rom <romangraef@gmail.com> | 2021-04-27 02:49:09 +0200 |
commit | f7dac7f1e69532a3242e29dde08ba8c1981a2796 (patch) | |
tree | 7f9b390a7ae66b237b78b2a7ae1fefe92c37b198 | |
parent | c8e1077c757ea1c536cbe1dba70f60428039acad (diff) | |
download | ldjam48-f7dac7f1e69532a3242e29dde08ba8c1981a2796.tar.gz ldjam48-f7dac7f1e69532a3242e29dde08ba8c1981a2796.tar.bz2 ldjam48-f7dac7f1e69532a3242e29dde08ba8c1981a2796.zip |
yield
-rw-r--r-- | scenes/levels/base_level.gd | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scenes/levels/base_level.gd b/scenes/levels/base_level.gd index dc228c0..3538993 100644 --- a/scenes/levels/base_level.gd +++ b/scenes/levels/base_level.gd @@ -115,8 +115,9 @@ func _unload_current_level(): yield(get_tree(), "idle_frame") # todo animation here? post mortem func _delayed_delete(c): - yield(get_tree().create_timer(5.0), "timeout") - c.queue_free() + yield(get_tree().create_timer(20.0), "timeout") + if c: + c.queue_free() func _load_current_level(): if _loaded_level != null: push_error("Tried to load level, while another level was already loaded.") |