예제 #1
0
 private void SaveData_Click(object sender, EventArgs e)
 {
     //Saves the current information for currentHero, currentItem, and currentArmor
     if (PlayerSelection != null)
     {
         AssessmentSerialization <Players> .Serialize("CurrentPlayer", Singleton.Instance.currentHero);//If there is no Player chosen, the program will not break
     }
     if (ItemSelection != null)
     {
         AssessmentSerialization <Items> .Serialize("CurrentItem", Singleton.Instance.currentItem);//If there is no Item chosen, the program will not break
     }
     if (ArmorSelection != null)
     {
         AssessmentSerialization <Armor> .Serialize("CurrentArmor", Singleton.Instance.currentArmor);//If there is no Armor chosen, the program will not break
     }
     SaveLoad.AppendText("                      Saved");
 }
예제 #2
0
 void SetUp()
 {
     //Saves the Player List
     AssessmentSerialization <List <Players> > .Serialize("ListofPlayersDefualt", Singleton.Instance.mHeros);
 }