Okay so basically you guys have helped me with making things come out of an actor. But now i need something to come out of the world at random times in random places. I have the prepare act already and i will send the code which i already have.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Water here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Water extends World
{
/**
* Constructor for objects of class Water.
*
*/
public Water()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(1000, 700, 1);
prepare();
}
/**
* Prepare the world for the start of the program.
* That is: create the initial objects and add them to the world.
*/
private void prepare()
{
Shark shark = new Shark();
addObject(shark,847,83);
}
}