What is the recommended function in which we have to declare runtime event listeners, collision event listeners? , is it in scene:create or scene:show?, because in my game when ever a player is dead the scene should reload & re-initialize these eventlisteners in a fresh manner.
Hi @kranthikumar88,
You should probably set Runtime listeners in the “:create” function. Collision listeners may also be set there. Alternatively, you could set collision listeners in the “:show” function, but then you should remember to remove them in the “:hide” function.
Hope this helps,
Brent
Hi @kranthikumar88,
You should probably set Runtime listeners in the “:create” function. Collision listeners may also be set there. Alternatively, you could set collision listeners in the “:show” function, but then you should remember to remove them in the “:hide” function.
Hope this helps,
Brent