Hello everyone. I am making game like sea war. So I have matrix 10 x 10 and i wirte such code:
for i = 1, 10 do
cellTab[i] = {}
xoff = 50
yoff = yoff + 50
for j = 1, 10 do
local cell = display.newImageRect( mainGroup, objectSheet, 1, 50, 50 )
cell.x = xoff
cell.y = yoff
cellTab[i][j] = cell
xoff = xoff + 50
end
end
I will make some action on every cell in matrix (for example change transperancy). So how i can do this to specific cell (for example 9 row 1 column)?
Or i am wrong in my start way, and need other stucture? Thanks for help.
P.s. sorry for my english.