Crazy ball is a thrilling endless game template ready for release. Crazy ball game kit comes with two different modes, each offering a completely different game play experience to your players.
Escape: in this mode, you have to move your ball through various mazes and avoid colliding with any maze objects.
Hi there… i was wondering if you could help me out or send me a script fix to where the high score doesnt save for the other game mode…in other words can you show me a fix to the scripts where both Game Modes have their own high scores saved… ty for replying
Hi there… i was wondering if you could help me out or send me a script fix to where the high score doesnt save for the other game mode…in other words can you show me a fix to the scripts where both Game Modes have their own high scores saved… ty for replying
in GameOverManager class, replace the saveScore function with the following code:
///***********************************************************************
/// Save player score
///***********************************************************************
void saveScore() {
int lastBestScore;
if(PlayerPrefs.GetInt("GameMode") == 0) {
//immediately save the last score
PlayerPrefs.SetInt("lastScore", PlayerManager.playerScore);
//check if this new score is higher than saved bestScore.
//if so, save this new score into playerPrefs. otherwise keep the last bestScore intact.
lastBestScore = PlayerPrefs.GetInt("bestScore");
if(PlayerManager.playerScore > lastBestScore)
PlayerPrefs.SetInt("bestScore", PlayerManager.playerScore);
} else if(PlayerPrefs.GetInt("GameMode") == 1) {
PlayerPrefs.SetInt("lastScore_s", PlayerManager.playerScore);
lastBestScore = PlayerPrefs.GetInt("bestScore_s");
if(PlayerManager.playerScore > lastBestScore)
PlayerPrefs.SetInt("bestScore_s", PlayerManager.playerScore);
}
}