Добавлен максимальный счёт с сохранением

This commit is contained in:
2025-01-31 14:44:57 +03:00
parent 64d5577fd8
commit 3f13aa2da6
6 changed files with 201 additions and 64 deletions

View File

@ -1,10 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MenuScript : MonoBehaviour
{
[SerializeField] private int _BestScore;
[SerializeField] private TextMeshProUGUI _TextScore;
private void OnEnable()
{
_BestScore = PlayerPrefs.GetInt("Best score");
_TextScore.text = "Лучший счёт - " + _BestScore;
}
// Start is called before the first frame update
public void RestartGame()
{