private void Update() { BestStats bs = BestStats.Instance; bestTimeText.text = ConvertSecondsToStringFormatted((int)bs.bestPlayTime); bestShotText.text = bs.bestNumberOfShots.ToString(); bestDeathText.text = bs.bestNumberOfDeaths.ToString(); }
private void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); } else { Instance = this; } DontDestroyOnLoad(this); bestPlayTime = float.MaxValue; bestNumberOfShots = int.MaxValue; bestNumberOfDeaths = int.MaxValue; }