I re-uploaded
public static ScoreBoard getScoreboard()
public void switchWorld()
{
ScoreBoard sb;
sb = getWorld().getObjects(ScoreBoard.class).get(0);
if (sb.getScore() >= 10100)
{
// check if the actor's current world is MyWorld then check if the scoreboards
// score is at 10100 if so set the world to stage 2 and add the survivor actor
Greenfoot.setWorld(new stage2(sb));
getWorld().addObject(this,400,300);
}//end if
if (sb.getScore() >= 100100)
{
// check if the actor's current world is stge 2 then check if the scoreboards
// score is at 100100 if so set the world to stage 3 and add the survivor actor
Greenfoot.setWorld(new stage3(sb));
getWorld().addObject(this,getX(),getY());
}
}World newWorld = new stage2(sb); Greenfoot.setWorld(newWorld); newWorld.addObject(this, 400, 300);
public static ScoreBoard getScoreboard()
World newWorld = new stage2(sb); Greenfoot.setWorld(newWorld); newWorld.addObject(this, 400, 300);
if (getWorld() instanceof MyWorld && MyWorld.getScoreboard().getScore() >= 10100)
public static ScoreBoard getScoreboard()