private int spawnTimer;
public void act()
{
if (start == 1 )
{
timeCount.setValue(tim.millisElapsed() / 5000);
}
spawnTimer = (spawnTimer+2)%180;
if (spawnTimer == 0) addObject(new enemy(), 1589, 463);
if (start == 1 )
{
timeCount.setValue(tim.millisElapsed() / 5000);
}
spawnTimer = (spawnTimer+2)%180;
if (spawnTimer == 0) addObject(new dog(), 1589, 463);
}
this is a code i try to use to spawn in 2 enemies at a different time the dogs are supposed to be added like 15 seconds in and the enemy from the begin