hello guys!
I'm using the "SceneManager" to switch between scenes.
On the first screen, I have a menu with four options:
new game
continue
options,
exit.
when I click "options"
Scene manager switches to the options screen.
The problem is that when I click on a blank area in the options screen, it recognizes the click button on the first screen.
And as if the button was working but invisible.
How do I remove the objects from the first screen?
If I remove the objects, I can return it when clicking the back button of the options screen?
>-
Comments
and it looks like this in my projects (this is just my way to do, probably can be improved) :
Also, all your event listeners will be added the next time you enter that scene again.
I am not sure that it's the best way to do it, other devs will probably come up with improvements and/or alternatives.
Question : are you sure that the listener that is .... listening... was added to the "first screen"? Are you sure that it was not added to the stage, the scene controller or another entity that is accessible globally?
After exiting the first screen, in theory it should have been automatically removed unless I mistake and somebody will correct me.
You helped me a lot.
I was doing wrong was not putting the code "inside" of the events.