RefreshAchievements() public method

public RefreshAchievements ( ) : void
return void
Exemplo n.º 1
0
	void LoadQuestsAndAchievements(){

		LoadQuests();
		
		var data = PlayerPrefs.GetString(SaveLoadSlot+"Player_AchievementHandler");
	    //If not blank then load it
	    if(!String.IsNullOrEmpty(data))
	    {
	        //Binary formatter for loading back
	        var b = new BinaryFormatter();
	        //Create a memory stream with the data
		    var m = new MemoryStream(Convert.FromBase64String(data));
		    //Load back the scores
			achievementHandler.achievements = new List<Achievement>();
		    achievementHandler.achievements = b.Deserialize(m) as List<Achievement>;
		}
		
		if(achievementHandler != null) achievementHandler.RefreshAchievements();
	}