private void AddNewProfile(string playerName)
    {
        _playerProfile = new PlayerProfile(playerName, 0, false, false, false);     // tworzę nowy profil gracza z domyślnymi wartościami

        _projectData.EntireList.Add(_playerProfile);                                // a teraz dodaje do niej aktualny _playerProfile
        _projectData.CurrentID = _projectData.EntireList.Count - 1;                 // nadanie nowemu userowi najwyzszego numeru na liscie
        _playerProfileController.SaveProfiles(_projectData);                        // zapisuję dane w singletonie
    }
Esempio n. 2
0
    public void UpdateModel(int score)
    {
        _projectData.EntireList[_projectData.CurrentID].HighScore = score;

        _playerProfileController.SaveProfiles(_projectData);                       // zapisz wyniki przed powrotem do sceny MENU
    }