Wondering what the best performance is between using local and global. From the API docs, it says this -
local:
[lua]crate1.collision = onLocalCollision
crate1:addEventListener( “collision”, crate1 )[/lua]
global:
[lua]Runtime:addEventListener( “collision”, onCollision )[/lua]
For my project, I have about 5-6 different types of objects (player, bullet, enemy, obstacle, etc.), and roughly 30-40 of them on screen at any given time. Currently I have local listeners on each physics object.
Would it make more sense to just register a single global collision listener instead? [import]uid: 49447 topic_id: 19494 reply_id: 319494[/import]