Пример #1
0
    public void LoadSaveGameData()
    {
        var saveData = SaveGameSerializer.Load();

        var highScoresManager = GetComponent <HighScoresManager>();

        if (highScoresManager != null)
        {
            highScoresManager.LoadHighScores(saveData);
        }
    }
Пример #2
0
    public void SaveGameData()
    {
        var saveData = SaveGameSerializer.Load();

        var highScoresManager = GetComponent <HighScoresManager>();

        if (highScoresManager != null)
        {
            saveData.highScores = highScoresManager.highScores;
        }

        SaveGameSerializer.Save(saveData);
    }