public void SaveStat(SavedStat statToSave) { if (PlayerPrefs.HasKey(statToSave.ToString())) { PlayerPrefs.SetInt(statToSave.ToString(), PlayerPrefs.GetInt(statToSave.ToString()) + 1); } else { PlayerPrefs.SetInt(statToSave.ToString(), 1); } OnStatSaved(); }
public int GetSavedStat(SavedStat stat) { return PlayerPrefs.GetInt(stat.ToString()); }