So i got the physics of my game working, but now my problem is trying to make the game roll over the levels when you beat them. I have three stages that each have a faster/harder AI to play. My problem is calling the score to be able to determine when the world should switch. I have been trying to use static methods to call a boolean result that compares the current score to the endscore. I am hitting a problem with my syntax though and cant figure out the exact thing to put in.
I have three stages so ill just post the important bits that aren't redundant. This pat of the code is supposed to check my counter to see if requirements are met.
This is my method for determining the requirements.
I have my Stage worlds sub classed to a world called "ComputerLevels". So I put the method to change the stage in the ComputerLevels world and then call it from the actual stage.
I can post any extra code that would help, thanks for the help.
public void beatStageOne()
{
if(counterRight.checkScore() =true)
{
Greenfoot.setWorld(new StageTwo());
}
}
public static boolean checkScore()
{
return score ==endScore;
}


