Hi everyone!
I’m just about to start working on an update function for my game but I wanted to ask if you guys know a better way performance wise.
I’m planning to make an “enterFrame” runtime listener that calls a function called update() this will in turn call the individual update functions for each of my entities that requires this.
So something like this
[lua]function update(event)
npc:update()
walls:update()
– etc.
end
Runtime:addEventListener(“enterFrame”, update) [/lua]
Also, I really don’t want all of my update functions to be called on every frame, how do I limit the calls to be every x frame? [import]uid: 129450 topic_id: 23240 reply_id: 323240[/import]