Optimize getting stats in pause menu
This commit is contained in:
2 files changed
+22
-22
No files matched your search
@@ -12,17 +12,17 @@ public class GamePlayer : MonoBehaviour {
|
||||
private float nextSpawnTime;
|
||||
internal BigInteger score;
|
||||
private BigInteger attempts;
|
||||
private BigInteger highscore;
|
||||
private BigInteger totalNormalBerries;
|
||||
private BigInteger totalPoisonBerries;
|
||||
private BigInteger totalSlowBerries;
|
||||
private BigInteger totalUltraBerries;
|
||||
private BigInteger totalSpeedyBerries;
|
||||
private BigInteger totalCoinBerries;
|
||||
private BigInteger totalRandomBerries;
|
||||
private BigInteger totalAntiBerries;
|
||||
private BigInteger totalGoldenBerries;
|
||||
private BigInteger totalAttempts;
|
||||
internal BigInteger highscore;
|
||||
internal BigInteger totalNormalBerries;
|
||||
internal BigInteger totalPoisonBerries;
|
||||
internal BigInteger totalSlowBerries;
|
||||
internal BigInteger totalUltraBerries;
|
||||
internal BigInteger totalSpeedyBerries;
|
||||
internal BigInteger totalCoinBerries;
|
||||
internal BigInteger totalRandomBerries;
|
||||
internal BigInteger totalAntiBerries;
|
||||
internal BigInteger totalGoldenBerries;
|
||||
internal BigInteger totalAttempts;
|
||||
private BigInteger totalCoins;
|
||||
private float boostLeft;
|
||||
private float slownessLeft;
|
||||
|
||||
@@ -75,17 +75,17 @@ public class GamePlayerPauseMenu : MonoBehaviour {
|
||||
statsButton.onClick.AddListener(() => {
|
||||
statsMenu.SetActive(true);
|
||||
var text = new StringBuilder();
|
||||
text.AppendLine("High Score: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreHighScore()));
|
||||
text.AppendLine("Total Normal Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalNormalBerries()));
|
||||
text.AppendLine("Total Poison Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalPoisonBerries()));
|
||||
text.AppendLine("Total Slow Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalSlowBerries()));
|
||||
text.AppendLine("Total Ultra Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalUltraBerries()));
|
||||
text.AppendLine("Total Coin Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalCoinBerries()));
|
||||
text.AppendLine("Total Speedy Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalSpeedyBerries()));
|
||||
text.AppendLine("Total Random Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalRandomBerries()));
|
||||
text.AppendLine("Total Anti Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalAntiBerries()));
|
||||
text.AppendLine("Total Golden Berries: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalGoldenBerries()));
|
||||
text.AppendLine("Total Attempts: " + Tools.FormatWithCommas(BazookaManager.Instance.GetGameStoreTotalAttepts()));
|
||||
text.AppendLine("High Score: " + Tools.FormatWithCommas(GamePlayer.Instance.highscore));
|
||||
text.AppendLine("Total Normal Berries: " + Tools.FormatWithCommas(GamePlayer.Instance.totalNormalBerries));
|
||||
text.AppendLine("Total Poison Berries: " + Tools.FormatWithCommas(GamePlayer.Instance.totalPoisonBerries));
|
||||
text.AppendLine("Total Slow Berries: " + Tools.FormatWithCommas(GamePlayer.Instance.totalSlowBerries));
|
||||
text.AppendLine("Total Ultra Berries: " + Tools.FormatWithCommas(GamePlayer.Instance.totalUltraBerries));
|
||||
text.AppendLine("Total Coin Berries: " + Tools.FormatWithCommas(GamePlayer.Instance.totalCoinBerries));
|
||||
text.AppendLine("Total Speedy Berries: " + Tools.FormatWithCommas(GamePlayer.Instance.totalSpeedyBerries));
|
||||
text.AppendLine("Total Random Berries: " + Tools.FormatWithCommas(GamePlayer.Instance.totalRandomBerries));
|
||||
text.AppendLine("Total Anti Berries: " + Tools.FormatWithCommas(GamePlayer.Instance.totalAntiBerries));
|
||||
text.AppendLine("Total Golden Berries: " + Tools.FormatWithCommas(GamePlayer.Instance.totalGoldenBerries));
|
||||
text.AppendLine("Total Attempts: " + Tools.FormatWithCommas(GamePlayer.Instance.totalAttempts));
|
||||
statsText.text = text.ToString();
|
||||
});
|
||||
statsMenuExitButton.onClick.AddListener(() => {
|
||||
|
||||
Reference in new issue
Block a user