I have no syntax errors. How do I display the objects in my world ?
import greenfoot.*; public class MyWorld extends World { public MyWorld() { super(800, 600, 1); /** CREATE AND ADD AN OBJECT INTO WORLD */ Actor object = getActor(); // to reference an Actor object addObject(object, 400, 300); // actor is put in world } // doesn't matter what type of Actor object is used /** DON"T ACTUALLY USE THE FOLLOWING */ // just returns an Actor object private Actor getActor() { return new Actor(){}; } }
setImage(new GreenfootImage(...));