public class Drone extends Mover
{
boolean gameStarted = true;
//int randSpawn = (Greenfoot.getRandomNumber(300)+50);
/**
* Act - do whatever the Drone wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
if (gameStarted == true)move (-4);
DroneSpawn();
}
public void DroneSpawn()
{
int i = 0;
if(i == 4)
{
Drone drone = new Drone();
getWorld().addObject(drone, 900, 200);
i = 0;
System.out.println("Drone in game");
}
while (i < 4) {
i++;
System.out.println(i);
}
}
}
