This site requires JavaScript, please enable it in your browser!
Greenfoot back
Gzuzfrk
Gzuzfrk wrote ...

2013/5/22

Increasing Spawning Rate

Gzuzfrk Gzuzfrk

2013/5/22

#
How do I make this code increase over time?
 private void spawnAlien()  
{  
    int rand = Greenfoot.getRandomNumber(150);  
    if (rand >=3) return;  
    
    if (rand == 0) addObject(new Alien(), 870, 453);  
   
}  
danpost danpost

2013/5/22

#
See other discussion.
You need to login to post a reply.