Beispiel #1
0
 void Reset()
 {
     CustomerLevel.Clear();
     CollectedRecipe.Clear();
     CollectedSubmaterial.Clear();
     Birdcoin = 0;
     PlayerPrefs.DeleteAll();
 }
Beispiel #2
0
    void LoadLevel()
    {
        int count = PlayerPrefs.GetInt(nameof(CustomerCount));

        CustomerLevel.Clear();
        for (int i = 0; i < count; i++)
        {
            string key = PlayerPrefs.GetString($"Customer{i}Level");
            if (string.IsNullOrEmpty(key))
            {
                continue;
            }

            int value = PlayerPrefs.GetInt(key);
            CustomerLevel.Add(key, value);
        }
    }