using UnityEngine;
using UnityEngine.UI;
public class ScoreMenu : MonoBehaviour
{
public Text sumText;
private int sumNumber;
public Text bestText;
private int bestNumber;
private void Start()
{
numPrefs = PlayerPrefs.GetInt("bestNumber");
bestPrefs = PlayerPrefs.GetInt("sumNumber");
bestNumber = Score.totalBestScore;
PlayerPrefs.SetInt("bestNumber", bestNumber);
sumNumber = Score.totalScoreNumber;
PlayerPrefs.SetInt("sumNumber", sumNumber);
PlayerPrefs.Save();
}
void Update()
{
bestText.text = "Best Score: " + bestNumber.ToString();
sumText.text = "Sum Of Scores: " + sumNumber.ToString();
}
}
bestNumber = Score.totalBestScore;
PlayerPrefs.SetInt("bestNumber", bestNumber);
sumNumber = Score.totalScoreNumber;
PlayerPrefs.SetInt("sumNumber", sumNumber);