コード例 #1
0
 public void Deserialize(JSON_TowerFloorParam json)
 {
     if (json == null)
     {
         throw new InvalidJSONException();
     }
     this.iname           = json.iname;
     this.title           = json.title;
     this.name            = json.name;
     this.expr            = json.expr;
     this.cond            = json.cond;
     this.tower_id        = json.tower_id;
     this.cond_quest      = json.cond_quest;
     this.hp_recover_rate = json.hp_recover_rate;
     this.pt            = (short)json.pt;
     this.lv            = json.lv;
     this.joblv         = json.joblv;
     this.can_help      = (int)json.can_help == 1;
     this.rdy_cnd       = json.rdy_cnd;
     this.reward_id     = json.reward_id;
     this.floor         = json.floor;
     this.is_unit_chg   = json.is_unit_chg;
     this.me_id         = json.me_id;
     this.is_wth_no_chg = json.is_wth_no_chg;
     this.wth_set_id    = json.wth_set_id;
     if (json.rand_tag != null)
     {
         this.rand_tag = new byte[json.rand_tag.Length];
         for (int index = 0; index < json.rand_tag.Length; ++index)
         {
             this.rand_tag[index] = (byte)json.rand_tag[index];
         }
     }
     this.naut = json.naut;
     this.map.Clear();
     if (json.map != null)
     {
         for (int index = 0; index < json.map.Length; ++index)
         {
             MapParam mapParam = new MapParam();
             mapParam.Deserialize(json.map[index]);
             this.map.Add(mapParam);
         }
     }
     this.BaseQuest = MonoSingleton <GameManager> .Instance.FindBaseQuest(QuestTypes.Tower, this.tower_id);
 }
コード例 #2
0
        public void Deserialize(JSON_MultiTowerFloorParam json)
        {
            if (json == null)
            {
                throw new InvalidJSONException();
            }
            this.id            = json.id;
            this.title         = json.title;
            this.name          = json.name;
            this.expr          = json.expr;
            this.cond          = json.cond;
            this.tower_id      = json.tower_id;
            this.cond_floor    = json.cond_floor;
            this.pt            = json.pt;
            this.lv            = json.lv;
            this.joblv         = json.joblv;
            this.reward_id     = json.reward_id;
            this.floor         = json.floor;
            this.unitnum       = json.unitnum;
            this.notcon        = json.notcon;
            this.me_id         = json.me_id;
            this.is_wth_no_chg = json.is_wth_no_chg;
            this.wth_set_id    = json.wth_set_id;
            this.map.Clear();
            if (json.map != null)
            {
                for (int index = 0; index < json.map.Length; ++index)
                {
                    MapParam mapParam = new MapParam();
                    mapParam.Deserialize(json.map[index]);
                    this.map.Add(mapParam);
                }
            }
            GameManager instance = MonoSingleton <GameManager> .Instance;

            this.BaseQuest = instance.FindQuest(this.tower_id);
            QuestParam questParam = this.GetQuestParam();

            instance.AddMTQuest(questParam.iname, questParam);
        }