Hi all,
I am having a strange problem where listeners stop working after I return from an overlay. I can’t post code because it is too big but basically what I am trying to do is:
1- User presses a button: Open a modal overlay that has choices.
2- User clicks on a choice (on the overlay): I close the overlay and go back to function “Check_Choice” on parent.
3- If choice is correct: Show another modal overlay with an image indicating a “Correct Answer”.
4- User presses the image “Correct Answer”: We go back to function “next_level” on parent.
When I am in the “next_level” function, I seem to lose all the event listeners on the parent. Even if I use composer to go to a different scene, I still seem not to have any listeners active.
My question is:
Is it OK to show an overlay from within function “Check_Choice” bearing in mind it is the function called from the first overlay? Or does that mean I have two modal overlays active t the same time?
How do I go about debugging this to know at which point exactly do I lose the listeners? I have downloaded sublime and I can set breakpoints, but how do I examine the state of listeners? Is there an internal table that I need to print?
Many thanks.