I want to clarify something. This is my code:
List<GameObject>[] dynamicCells; //1
List<GameObject>[] staticCells; //2
dynamicCells = new List[numCells]; //3
staticCells = new List[numCells]; //4
for (int i = 0; i < numCells; i++) {
dynamicCells[i] = new ArrayList<GameObject>(10); //5
staticCells[i] = new ArrayList<GameObject>(10); //6
}
On the first and second step I create an "empty" array of GameObject list reference.
On the third and fourth step I allocate memory for an array of List which I return its address reference. On the 5, 6 step I create a new ArrayList reference of type GameObject which I assign on my List.
So in the end I am left with an array Of list references that each one hold an ArrayList of game objects. Is this right ? Is there any better way to explain this ?
Listobjects.