void Awake() { hiScoresPath = Application.dataPath + MethodNamesDatabase.pathString; if (_instance != null && _instance != this) { Destroy(gameObject); return; } else { _instance = this; DontDestroyOnLoad(this); } CheckHighscoresFileAndCreate(); }
private void WinGame() { if (CheckKeys()) { AddOrRemovePoints(pointsForWin); StartConfig.GetStartConfig().SaveHiScore(pointsCount, timeElapsed); uiManager.ShowWinScreen(timeElapsed); } else { int diff = keysNeeded - keysCollected; if (diff == 1) { uiManager.ShowNotification(MethodNamesDatabase.lastKeyString); } else { uiManager.ShowNotification(MethodNamesDatabase.youNeedString + diff + MethodNamesDatabase.keysString); } } }
public void ChangeGameName(TMP_InputField tMP_InputField) { StartConfig.GetStartConfig().ChangeGameName(tMP_InputField); }
private void Start() { StartConfig.GetStartConfig().FillHiScores(this); }