Now I fixed my first problem, I couldn't get into my level2 world. This is fixed.
BUT NOW: I am in my level 2 world but it doesn't load my Actors (walls, the actor himself, coins to pick up).
Here is my level2 World code have I put it in some wrong place maybe? :
Thanks already!
public class level2 extends World { public int score = 0; private int item = 10; public Score scoreboard; /** * Default constructor. If we don't receive a game character, create one. */ public level2() { this(new haai()); plaatsCoins(); blokken(); haaiTonen(); scoreboard = new Score(); addObject(scoreboard, 10, 1); } /** * Constructor used during play - the game character is passed in. */ public level2(haai Haai) { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(60, 60, 10); } private void blokken() { //linkerkant addObject(new zand(), 1, 6); addObject(new zand(), 1, 12); addObject(new zand(), 1, 18); addObject(new zand(), 1, 24); addObject(new zand(), 1, 30); addObject(new zand(), 1, 36); addObject(new zand(), 1, 42); addObject(new zand(), 1, 48); addObject(new zand(), 1, 54); addObject(new zand(), 1, 60); //bovenkant addObject(new zand(), 6, 2); addObject(new zand(), 12, 2); addObject(new zand(), 18, 2); addObject(new zand(), 24, 2); addObject(new zand(), 30, 2); addObject(new zand(), 36, 2); addObject(new zand(), 42, 2); addObject(new zand(), 48, 2); addObject(new zand(), 54, 2); addObject(new zand(), 60, 2); //rechterkant addObject(new zand(), 58, 6); addObject(new zand(), 58, 12); addObject(new zand(), 58, 18); addObject(new zand(), 58, 24); addObject(new zand(), 58, 30); addObject(new zand(), 58, 36); addObject(new zand(), 58, 42); addObject(new zand(), 58, 48); addObject(new zand(), 58, 54); addObject(new zand(), 58, 60); //onderkant addObject(new zand(), 6, 60); addObject(new zand(), 12, 60); addObject(new zand(), 18, 60); addObject(new zand(), 24, 60); addObject(new zand(), 30, 60); addObject(new zand(), 36, 60); addObject(new zand(), 42, 60); addObject(new zand(), 48, 60); addObject(new zand(), 54, 60); addObject(new zand(), 60, 60); } private void plaatsCoins() { addObject(new coin(), 50, 50); addObject(new coin(), 40, 40); addObject(new coin(), 30, 30); addObject(new coin(), 20, 20); addObject(new coin(), 10, 10); addObject(new coin(), 50, 10); addObject(new coin(), 40, 10); addObject(new coin(), 30, 10); addObject(new coin(), 20, 10); addObject(new coin(), 50, 20); addObject(new coin(), 40, 20); addObject(new coin(), 30, 20); addObject(new coin(), 10, 20); addObject(new coin(), 50, 30); addObject(new coin(), 40, 30); addObject(new coin(), 20, 30); addObject(new coin(), 10, 30); addObject(new coin(), 50, 40); addObject(new coin(), 30, 40); addObject(new coin(), 20, 40); addObject(new coin(), 10, 50); addObject(new coin(), 20, 50); addObject(new coin(), 30, 50); addObject(new coin(), 40, 50); } private void haaiTonen() { addObject(new haai(), 10,40); } public Score getScoreObject() { return scoreboard; } }