Пример #1
0
    public void ArrowHitPlayer()
    {
        saveData.remainingLives--;
        UpdateScore();

        saveDataSerializer.Save(saveData);
    }
Пример #2
0
    private void SetUpSaveData()
    {
        saveDataSerializer = new SaveDataSerializer();

        saveData = saveDataSerializer.Load();

        if (saveData == null)
        {
            saveData = new SaveData();
            saveData.remainingLives = 100;
            saveDataSerializer.Save(saveData);
        }
    }