123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
- using Bright.Serialization;
- using System.Collections.Generic;
- using SimpleJSON;
- namespace ET.Editor.UnitConfig
- {
- public sealed partial class UnitBaseConfig : Bright.Config.EditorBeanBase
- {
- public UnitBaseConfig()
- {
- Name = "";
- SkillList = new System.Collections.Generic.List<int>();
- }
- public override void LoadJson(SimpleJSON.JSONObject _json)
- {
- {
- var _fieldJson = _json["Id"];
- if (_fieldJson != null)
- {
- if(!_fieldJson.IsNumber) { throw new SerializationException(); } Id = _fieldJson;
- }
- }
-
- {
- var _fieldJson = _json["Name"];
- if (_fieldJson != null)
- {
- if(!_fieldJson.IsString) { throw new SerializationException(); } Name = _fieldJson;
- }
- }
-
- {
- var _fieldJson = _json["SkillList"];
- if (_fieldJson != null)
- {
- if(!_fieldJson.IsArray) { throw new SerializationException(); } SkillList = new System.Collections.Generic.List<int>(); foreach(JSONNode __e in _fieldJson.Children) { int __v; if(!__e.IsNumber) { throw new SerializationException(); } __v = __e; SkillList.Add(__v); }
- }
- }
-
- {
- var _fieldJson = _json["AttributeConfigId"];
- if (_fieldJson != null)
- {
- if(!_fieldJson.IsNumber) { throw new SerializationException(); } AttributeConfigId = _fieldJson;
- }
- }
-
- }
- public override void SaveJson(SimpleJSON.JSONObject _json)
- {
- {
- _json["Id"] = new JSONNumber(Id);
- }
- {
- if (Name == null) { throw new System.ArgumentNullException(); }
- _json["Name"] = new JSONString(Name);
- }
- {
- if (SkillList == null) { throw new System.ArgumentNullException(); }
- { var __cjson = new JSONArray(); foreach(var _e in SkillList) { __cjson["null"] = new JSONNumber(_e); } _json["SkillList"] = __cjson; }
- }
- {
- _json["AttributeConfigId"] = new JSONNumber(AttributeConfigId);
- }
- }
- public static UnitBaseConfig LoadJsonUnitBaseConfig(SimpleJSON.JSONNode _json)
- {
- UnitBaseConfig obj = new UnitConfig.UnitBaseConfig();
- obj.LoadJson((SimpleJSON.JSONObject)_json);
- return obj;
- }
-
- public static void SaveJsonUnitBaseConfig(UnitBaseConfig _obj, SimpleJSON.JSONNode _json)
- {
- _obj.SaveJson((SimpleJSON.JSONObject)_json);
- }
- /// <summary>
- /// Id
- /// </summary>
- public int Id { get; set; }
- /// <summary>
- /// 英雄名
- /// </summary>
- public string Name { get; set; }
- /// <summary>
- /// 技能列表
- /// </summary>
- public System.Collections.Generic.List<int> SkillList { get; set; }
- /// <summary>
- /// 属性配置Id
- /// </summary>
- public int AttributeConfigId { get; set; }
- }
- }
|