123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- //------------------------------------------------------------------------------
- // <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 UnitAttributeConfig : Bright.Config.EditorBeanBase
- {
- public UnitAttributeConfig()
- {
- }
- 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["HP"];
- if (_fieldJson != null)
- {
- if(!_fieldJson.IsNumber) { throw new SerializationException(); } HP = _fieldJson;
- }
- }
-
- {
- var _fieldJson = _json["MP"];
- if (_fieldJson != null)
- {
- if(!_fieldJson.IsNumber) { throw new SerializationException(); } MP = _fieldJson;
- }
- }
-
- {
- var _fieldJson = _json["Attack"];
- if (_fieldJson != null)
- {
- if(!_fieldJson.IsNumber) { throw new SerializationException(); } Attack = _fieldJson;
- }
- }
-
- {
- var _fieldJson = _json["MoveSpeed"];
- if (_fieldJson != null)
- {
- if(!_fieldJson.IsNumber) { throw new SerializationException(); } MoveSpeed = _fieldJson;
- }
- }
-
- {
- var _fieldJson = _json["AttackSpeed"];
- if (_fieldJson != null)
- {
- if(!_fieldJson.IsNumber) { throw new SerializationException(); } AttackSpeed = _fieldJson;
- }
- }
-
- }
- public override void SaveJson(SimpleJSON.JSONObject _json)
- {
- {
- _json["Id"] = new JSONNumber(Id);
- }
- {
- _json["HP"] = new JSONNumber(HP);
- }
- {
- _json["MP"] = new JSONNumber(MP);
- }
- {
- _json["Attack"] = new JSONNumber(Attack);
- }
- {
- _json["MoveSpeed"] = new JSONNumber(MoveSpeed);
- }
- {
- _json["AttackSpeed"] = new JSONNumber(AttackSpeed);
- }
- }
- public static UnitAttributeConfig LoadJsonUnitAttributeConfig(SimpleJSON.JSONNode _json)
- {
- UnitAttributeConfig obj = new UnitConfig.UnitAttributeConfig();
- obj.LoadJson((SimpleJSON.JSONObject)_json);
- return obj;
- }
-
- public static void SaveJsonUnitAttributeConfig(UnitAttributeConfig _obj, SimpleJSON.JSONNode _json)
- {
- _obj.SaveJson((SimpleJSON.JSONObject)_json);
- }
- /// <summary>
- /// Id
- /// </summary>
- public int Id { get; set; }
- /// <summary>
- /// 生命值
- /// </summary>
- public float HP { get; set; }
- /// <summary>
- /// 魔法值
- /// </summary>
- public float MP { get; set; }
- /// <summary>
- /// 攻击力
- /// </summary>
- public float Attack { get; set; }
- /// <summary>
- /// 移速
- /// </summary>
- public float MoveSpeed { get; set; }
- /// <summary>
- /// 攻击速度
- /// </summary>
- public float AttackSpeed { get; set; }
- }
- }
|