It looks like you're new here. If you want to get involved, click one of these buttons!
Mells
Guru
Until now I used to initialiaze my variables in Scene:init() and from there I call for example :
enterBegin: Dispatched when your new scene is about to enter the stage. You can initialize your variables here.
enterEnd: Dispatched after the transition of new scene has ended. Mostly, you add listeners and start your logic here.
Comments
Here's a copy of my scene template file.
Likewise in the exitSceneStart() function I disable all widgets / controls etc for the same reason and then in the exitSceneEnd() function I remove / destroy any non-permanent resources allocated during enterSceneStart().
That structure helps to keep my code neat and tidy and means that I don't forget to release resources, leak memory etc.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Those informations will probably be helpful for a lot of new users of Gideros.
I'm back to work and will implement those changes.