If an object spawn the summary message appears in my screen.
but my problem is that the message appears 3 times in the 3 places.
What i want to do is that when the first object appears, the first message line appears
and when the 2nd object appears the second message appears in the second line
(world class)
if (spawnCounter++ > 625)
{
addObject(new cc_Thief(), Greenfoot.getRandomNumber(getWidth()), Greenfoot.getRandomNumber(470));
addObject(new cc_Fire(), Greenfoot.getRandomNumber(getWidth()), Greenfoot.getRandomNumber(470));
addObject(new cc_Accident(), Greenfoot.getRandomNumber(getWidth()), Greenfoot.getRandomNumber(470));
// Call setMessage method in SummaryScreen class
((cc_SummaryScreen) getObjects(cc_SummaryScreen.class).get(0)).setMessage("Er is Vuur!");
((cc_SummaryScreen) getObjects(cc_SummaryScreen.class).get(0)).setMessage("Er is een dief gesignaleerd");
((cc_SummaryScreen) getObjects(cc_SummaryScreen.class).get(0)).setMessage("Botsing in Rotterdam");
spawnCounter = 1;
}
(SummeryScreen class)
public void setMessage(String message)
{
getWorld().addObject(new cc_TextField(380, 20, message,20),600, 510);
getWorld().addObject(new cc_TextField(380, 20, message,20),600, 530);
getWorld().addObject(new cc_TextField(380, 20, message,20),600, 550);
