Esempio n. 1
0
 public static void AddValue(SamAchievements.AchievementNames name, int v)
 {
     if(Achievements.GetAchievement(name).AddValue(v)) //returns true if achievements is unlocked
     {
         Debug.Log("Unlocked Achievement: " + name.ToString());
     }
 }
Esempio n. 2
0
 public static void Unlock(SamAchievements.AchievementNames name)
 {
     if(Achievements.GetAchievement(name).Unlock())  //returns true if achievements is unlocked
     {
         Debug.Log("Unlocked Achievement: " + name.ToString());
         SaveAchievements();
     }
 }
Esempio n. 3
0
        public static void LoadAchievements()
        {
            if (!File.Exists(Application.persistentDataPath + "/samach.ach"))
            {
                m_achievements = new SamAchievements();
                return;
            }

            BinaryFormatter bf = new BinaryFormatter();
            FileStream fs = File.Open(Application.persistentDataPath + "/samach.ach", FileMode.Open);

            m_achievements = (SamAchievements)bf.Deserialize(fs);
            fs.Close();
        }