What happens when I have code in enterframe that takes longer than the time enterframe has to execute?
Do the iterations build up or does enterframe wait for my code to complete?
I am doing a cleanup loop in enterframe to remove my dead enemies and was noticing that it appears to be a bit quirky…
local function gameLoop( event )
for i = #enemy, 1, -1 do
if enemy[i].isdead == true then
if enemy[i].timer then – cancel shoot timer
timer.cancel(enemy[i].timer)
enemy[i].timer=nil
end
mte.removeSprite(enemy[i], false) --event.target, true)
physics.removeBody(enemy[i])
table.remove(enemy,i)
end
end