Hello I created two seperate score counters for each level. In my final level I want to show the total score from the previous level plus the score from the final level. But whenever I run it, it adds the score from the last level twice, is my calculation messed up in line 26?
public MyWorld()
{
super(1280, 720, 1);
time = 250;
timer = 1000;
score = 0;
secondScore = 0;
volume = 25;
}
public void showScore()
{
showText("Score: " + score, 800,20);
}
public void showSecondScore()
{
showText("Score: " + secondScore, 800,20);
}
public void showFirstLevelScore()
{
showText("Your Final Score: " + score, 640, 360);
}
public void showSecondLevelScore()
{
int total = score + secondScore;
showText("Your Total Score: " + total, 640, 360);
}
