Hello
I'm having trouble adding objects to MyWorld from a method, updateTileValues() that is called in act() for an actor subclass. It compiles ok and works fine in theory, I tested with my print statements in the method. Any thoughts?
Thanks!
public void updateTileValues()
{
for (int r = 0; r < MyWorld.tileValues.length; r++)
{
for (int c = 0; c < MyWorld.tileValues[r].length; c++)
{
System.out.print(""+MyWorld.tileValues[r][c].getValue()+"\t");
String theValueStr = MyWorld.tileValues[r][c].getValueAsString();
int theXCoord = MyWorld.tileValues[r][c].getXCoord();
int theYCoord = MyWorld.tileValues[r][c].getYCoord();
getWorld().removeObject(MyWorld.tileValues[r][c]);
getWorld().addObject(new TileValue(theXCoord, theYCoord, theValueStr), theXCoord, theYCoord);
}
System.out.print("\n");
}
}
