None but it just doesn't show my Actor in level2...
public void checkNextLevel() { if(getX() == 57 && getY() == 30) { if(level == 1) { level = 2; Greenfoot.setWorld(new level2(this)); getWorld().removeObject(this); } else { level = 1; Greenfoot.setWorld(new wereld(this)); getWorld().removeObject(this); } } }
public void punt() { wereld mySpaceWorld = (wereld) getWorld(); // <-- THIS LINE! Score addScore = mySpaceWorld.getScoreObject(); addScore.addTenToScore(); }