Hello,
i have a method that spawns rocks over time:
Those rocks can be destroyed, what makes the world pretty empty after a while (if you destroy them fast). So i was asking how do i let additional rocks spawn faster the less rocks there are currently in the world?
Thanks :)
public void placeRocks()
{
if(Greenfoot.getRandomNumber(70) == 1)
{
int x = Greenfoot.getRandomNumber(900);
int y = Greenfoot.getRandomNumber(900);
Rock rock = new Rock();
rock.setRotation(Greenfoot.getRandomNumber(360));
addObject(rock, x, y);
}
}
