I create a group like that below, for creating the walls in the map permanently
local images = display.newGroup()
for j=1,20 do
for k=1,20 do
if map[j][k]==1 then
local block
block=display.newImage(“wall.png”, size*(j-1), size*(k-1))
block:setReferencePoint(display.TopLeftReferencePoint)
block:scale( size/24, size/24)
images:insert(block)
end
end
end
There are a function for update the screen when something hapens, for example, the hero moves…
function update_screen()
– draw background
– draw hero
– draw other elements
– BRING WALLS IMAGES TO FRONT *
end
So, how can I bring the whole image group (all images in the group) to front at once ?
If I can’t, so I need to bring all individual images in the group singly, so I need to access them but I don’t know how.
Help me, please
Thanks!