Hello,
sorry for the following newbie questions.
For my first shooter game I was creating meteors through sprite objects (meteors) that I put in a group (meteor).
-
is better to animate the parent first and put the children in the group, or animate children one by one after the insertion?
–in create function parent meteor meteor:play() meteors.insert(meteors, meteor)
or
--in create function parent meteor meteors.insert(meteors, meteor) -- in main loop function if(meteors.numChildren ~= 0) then for i = 1, meteors.numChildren do if(meteors[i] ~= nil) then meteors[i]:play() meteors[i].y = meteors[i].y + (stage \* 3) -- falling velocity if(meteors[i].y \> \_H+meteors[i].height) then meteors[i]:pause() -- needs or not??? display.remove(meteors[i]) meteors[i] = nil end end end end
- Before removing sprites is good to pause the animation or is it useless?
Thanks for your help.
Greetings.
-j