Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
removing event listeners — Gideros Forum

removing event listeners

cloud_timecloud_time Member
edited April 2013 in General questions
Hello all,

I have some questions about removing event listeners. I understand that before we change to a different scene using sceneManager, we should remove event listeners. I have many mini games in my game, and in each there many event listeners. When I used onExitBegin, it didn't run, and I got an error. Therefore, I'm actually removing the event listeners before I do sceneManager:changeScene(.....).

My questions are as below:
1- if I remove a child, will it remove the event listeners attached to it?
2- What if I have an event listener like this, how shall I remove it?
self:addEventListener("increase score", function()
self.score = self.score + 100
end)

Thank you.

Comments

Sign In or Register to comment.