Hey im trying to create levels within the world subclass Basement. This is what I have right now.
I want to move the Isaac object but not remove him as he does have health, along with a crap top of other things included with him. However i have yet been able to successfully move him. Any tips?
public class Basement extends World { private GreenfootSound music = new GreenfootSound("Danny Baranowsky - Enmity of the Dark Lord.mp3"); private int level = 50; /** * Constructor for objects of class Basement. * */ public Basement() { super(795, 598, 1); addObject(new Isaac(), 393,500); addObject(new Chub(), 393,250); addObject(new Charger(), 473, 250); addObject(new Charger(), 313, 250); } public void act() { if (numberOfObjects() == 1) { getActor().Isaac().setLocation(393,500); addObject(new Charger(), 393,250); addObject(new Charger(), 473, 250); addObject(new Charger(), 313, 250); } } public void started() { music.setVolume(15); music.playLoop(); } }