Exemple #1
0
 protected override void setProperty(XElement element)
 {
     Level   = int.Parse(element.Element("_level").Value);
     Exp     = uint.Parse(element.Element("_exp").Value);
     St_win  = uint.Parse(element.Element("_st_win").Value);
     St_lose = uint.Parse(element.Element("_st_lose").Value);
     Pt_win  = uint.Parse(element.Element("_pt_win").Value);
     Pt_lose = uint.Parse(element.Element("_pt_lose").Value);
     Rate    = double.Parse(element.Element("_rate").Value);
     foreach (XElement item2 in element.Element("_clearDifficult").Elements())
     {
         DifficultKind item = (DifficultKind)(int)Enum.Parse(typeof(DifficultKind), item2.Value);
         ClearDifficult.Add(item);
     }
     if (element.Element("_rebellion_win") != null)
     {
         Rebellion_win = uint.Parse(element.Element("_rebellion_win").Value);
     }
     if (element.Element("_deck_practice_num") != null)
     {
         Deck_practice_num = uint.Parse(element.Element("_deck_practice_num").Value);
     }
     if (element.Element("_lostShipNum") != null)
     {
         LostShipNum = uint.Parse(element.Element("_lostShipNum").Value);
     }
 }
Exemple #2
0
 public void AddClearDifficult(DifficultKind difficult)
 {
     if (!ClearDifficult.Contains(difficult))
     {
         ClearDifficult.Add(difficult);
     }
 }