Hello,
I get a nullPointerException when from line 6, where I try to add the Tile object that I just created in the 2D array. Any ideas why I am getting this?
Thanks!
for (int r = 0; r < tiles.length; r++)
{
for (int c = 0; c < tiles[r].length; c++)
{
tiles[r][c] = new Tile(theXCoord, theYCoord);
getWorld().addObject(tiles[r][c], tiles[r][c].getXCoord(), tiles[r][c].getYCoord());
theXCoord += 50;
}
theXCoord = 170;
theYCoord += 50;
}