I’m having an issue with Composer. I have 1st scene I call Menu.lua and then 2nd scene Levels.lua and 3rd scene level01.lua where I have the level I want to play. I use print command to see in output window what is happening and this is the output
Menu:create
Menu:show will
Menu:show did
Menu:hide will
levels01: create
levels01: hide will
levels01: hide did
levels01: show will
levels01: show did
Menu:destroy
levels01: show will
levels01: show did
Levels enter first “Hide” and then “Show” and then “Show” again. If I run levels01 straight from Main scene then the output is correct:
levels01: create
levels01: show will
levels01: show did
this behaviour is causing a lot of issues with event listeners and functions. Problem is that if scene enters first to “hide” where I’m removing event listener instead of entering “show” where I’m adding event listener I end up with nil error. That makes sense because I’m trying to remove event listener which does not exist yet. How to fix composer to enter scene in the right order?
This is link to my Dropbox
https://www.dropbox.com/sh/02392n8v0cdyrxn/AACfrWP9iq2BKTSQPx–wfjFa/Composer