Greetings guys, I have a problem that I believe is something I'm doing wrong. I'm using the downloadable game template (which has the effects of changing scenes).
When calling the game level, I add (addChild) the characters that are created with the Sprites class that has in them the event ENTER_FRAME (where it controls the animations, adds and deletes particles, movieclipes etc ...).
When I remove the Level scene the character's ENTER_FRAME keeps running endlessly, even if I remove (with removeChild) the event is still active ...
What is the correct procedure in these cases? Does anyone have any ideas?
Thanks.
Comments
Likes: kinrpg, plicatibu
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I redid this piece of code in my project and it worked. Now I'm reviewing it and finding that a lot was running when it shouldn't be.
https://wiki.giderosmobile.com/index.php/EventDispatcher:removeAllListeners
Likes: kinrpg, plicatibu
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I reconfigured the codes of the scenes and game objects following their suggestions. It worked very well. It is now clearing events and removing objects correctly right after the scene is changed.
Thank you very much for your help.
Likes: oleg, antix, MoKaLux