コード例 #1
0
 public void Deserialize(JSON_ChapterParam json)
 {
     if (json == null)
     {
         throw new InvalidJSONException();
     }
     this.iname      = json.iname;
     this.name       = json.name;
     this.expr       = json.expr;
     this.world      = json.world;
     this.start      = json.start;
     this.end        = json.end;
     this.hidden     = json.hide != 0;
     this.section    = json.chap;
     this.banner     = json.banr;
     this.prefabPath = json.item;
     this.helpURL    = json.hurl;
     this.keys       = new List <KeyItem>();
     if (!string.IsNullOrEmpty(json.keyitem1) && json.keynum1 > 0)
     {
         this.keys.Add(new KeyItem()
         {
             iname = json.keyitem1,
             num   = json.keynum1
         });
     }
     if (this.keys.Count > 0)
     {
         this.keytime = json.keytime;
     }
     this.quests.Clear();
 }
コード例 #2
0
 public void Deserialize(string language, JSON_ChapterParam json)
 {
     this.Deserialize(json);
     this.localizeFields(language);
 }