The title may be a bit misleading (or not even make sense) because I have no idea how to describe it.
When it says "addObject(new Tile(), 5, 5);", I want 'Tile' to become 'RedTile' or 'GreenTile' depending on what 'i' is. Is this possible?
public class MyWorld extends World
{
public int HowManyPerRow = 160;
public int HowManyPerColumn = 90;
public MyWorld()
{
// Create a new world with 1700x900 cells with a cell size of 1x1 pixels.
super(1600, 900, 1); //1737 x 949 = Max res (for me)
gen();
}
public void gen()
{
int e = 0;
String tiles[] = new String[2]; // Creates an array with a size of 3
for(int i = 0; i < 2; i++) // Assigns the values of the array to RGB
{
if(i == 0)
{
tiles[i] = ("Red"); //tiles[i(0)] = Red
}
else if(i == 1)
{
tiles[i] = ("Green"); //tiles[i(1)] = Green
}
else if(i == 2)
{
tiles[i] = ("Blue"); //tiles[i(2)] = Blue
}
e++;
}
for(int q = 0; q < HowManyPerRow - 1; q++)
{
addObject(new Tile(), 5, 5);
}


