Beispiel #1
0
 public int this[int level, int status]
 {
     get
     {
         return(PlayerPrefs.GetInt(PlayerPrefsKeys.buildObjectiveStatusKey(level, status), 0));
     }
     set
     {
         PlayerPrefs.SetInt(PlayerPrefsKeys.buildObjectiveStatusKey(level, status), value);
     }
 }
Beispiel #2
0
    public static void Reset()
    {
        PlayerPrefs.SetInt(PlayerPrefsKeys.gameObjectivesIndex, 0);

        //here we consider 1 section and 6 objectives per section
        for (int lv = 0; lv < 1; lv++)
        {
            for (int obj = 1; obj <= 6; obj++)
            {
                PlayerPrefs.SetInt(PlayerPrefsKeys.buildObjectiveKey(lv, obj), 0);
                PlayerPrefs.SetInt(PlayerPrefsKeys.buildObjectiveStatusKey(lv, obj), 0);
            }
        }
    }