I’m having trouble figuring out exactly what’s going on in part of the code.
When the fish are created, something like this happens:
for i=1,numFish do
local group = display.newGroup()
-- code
group.x = nx
group.y = ny
-- code
doAnimate[#doAnimate + 1] = group
group:addEventListener( "touch", touchFish )
end
First, why is it creating a new display group for each fish? Or is it?
Why not an image object instead of a group? Does it have something to do with code I’m not listing above, i.e. the fact that fish can be flipped?
If I had a bunch of objects to animate, but each had only one form, is this the appropriate method to use, or is there a better way?
I just don’t understand why it’s a display group.
Sean. [import]uid: 4993 topic_id: 634 reply_id: 300634[/import]