local arr = {} local num = {} for i = 1 ,5 do arr[i] ={} for j = 1 ,5 do arr[i][j] = display.newRect(0,0,80,80) arr[i][j].x = i\* 82+50 arr[i][j].y = j\*82+50 end end for i = 1 ,5 do num[i] ={} for j = 1 ,5 do num[i][j] = display.newText(1, 100, 330, native.systemFont, 30 ) num[i][j].x = arr[i][j].x num[i][j].y = arr[i][j].y num[i][j]:setFillColor(0,0,0) end end
How to insert one number and one rectangle in one group ?
num[1][1] and arr[1][1] insert to group 1
num[1][2] and arr[1][2] insert to group 2
num[1][3] and arr[1][3] insert to group 3
…
…
…