Пример #1
0
 public void CreateProfile(string name)
 {
     SProfilePlayer.setInstance(new SProfilePlayer(name));
     SProfilePlayer.getInstance().AchievementsManager.AddStepAchievement(AchievementEvent.createProfile);
     SProfilePlayer.getInstance().SpritesAchievements = SpritesAchievements;
     SProfilePlayer.getInstance().DefaultSprite       = DefaultSprite;
 }
Пример #2
0
 public void LoadProfile(string fullName)
 {
     if (File.Exists("./saves/" + fullName))
     {
         BinaryFormatter bf   = new BinaryFormatter();
         FileStream      file = File.Open("./saves/" + fullName, FileMode.Open);
         SProfilePlayer.setInstance((SProfilePlayer)bf.Deserialize(file));
         file.Close();
         SProfilePlayer.getInstance().AchievementsManager.ResetManagerOnAchievementInfos();
         SProfilePlayer.getInstance().SpritesAchievements = SpritesAchievements;
         SProfilePlayer.getInstance().DefaultSprite       = DefaultSprite;
     }
     else
     {
         Debug.LogWarning("file not found");
         CreateProfile("Lost Save");
     }
 }