public void CheckIfAchievementIsUnlocked() { if (PlayerPrefs.GetInt(achievementType.ToString()) == 0) { text.color = Color.red; } else { text.color = Color.green; isUnlocked = true; } }
public AchievementStatus GetAchievementStatus(AchievementTypes _type, int _id) { int _statusInt = PlayerPrefs.GetInt("Player" + _id.ToString() + _type.ToString()); if (_statusInt == 1) { return(AchievementStatus.FINISHED); } else { return(AchievementStatus.UNFINISHED); } }
public void SetAchievementStatus(AchievementTypes _type, int _id, int _status) { PlayerPrefs.SetInt("Player" + _id.ToString() + _type.ToString(), _status); }