| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- //------------------------------------------------------------------------------
- // <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 cfg
- {
- public sealed partial class SingleEnemyConfig : Bright.Config.BeanBase
- {
- public SingleEnemyConfig(JSONNode _json)
- {
- { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
- { if(!_json["EnemyPrefab"].IsString) { throw new SerializationException(); } EnemyPrefab = _json["EnemyPrefab"]; }
- { if(!_json["HP"].IsNumber) { throw new SerializationException(); } HP = _json["HP"]; }
- { var __json0 = _json["Attack1"]; if(!__json0.IsArray) { throw new SerializationException(); } Attack1 = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Attack1.Add(__v0); } }
- { var __json0 = _json["Attack2"]; if(!__json0.IsArray) { throw new SerializationException(); } Attack2 = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Attack2.Add(__v0); } }
- PostInit();
- }
- public SingleEnemyConfig(int ID, string EnemyPrefab, int HP, System.Collections.Generic.List<int> Attack1, System.Collections.Generic.List<int> Attack2 )
- {
- this.ID = ID;
- this.EnemyPrefab = EnemyPrefab;
- this.HP = HP;
- this.Attack1 = Attack1;
- this.Attack2 = Attack2;
- PostInit();
- }
- public static SingleEnemyConfig DeserializeSingleEnemyConfig(JSONNode _json)
- {
- return new SingleEnemyConfig(_json);
- }
- /// <summary>
- /// 怪物ID
- /// </summary>
- public int ID { get; private set; }
- /// <summary>
- /// 怪物Prefab
- /// </summary>
- public string EnemyPrefab { get; private set; }
- /// <summary>
- /// 基础血量
- /// </summary>
- public int HP { get; private set; }
- /// <summary>
- /// Attack1攻击力
- /// </summary>
- public System.Collections.Generic.List<int> Attack1 { get; private set; }
- /// <summary>
- /// Attack2攻击力
- /// </summary>
- public System.Collections.Generic.List<int> Attack2 { get; private set; }
- public const int __ID__ = 491839330;
- public override int GetTypeId() => __ID__;
- public void Resolve(Dictionary<string, object> _tables)
- {
- PostResolve();
- }
- public void TranslateText(System.Func<string, string, string> translator)
- {
- }
- public override string ToString()
- {
- return "{ "
- + "ID:" + ID + ","
- + "EnemyPrefab:" + EnemyPrefab + ","
- + "HP:" + HP + ","
- + "Attack1:" + Bright.Common.StringUtil.CollectionToString(Attack1) + ","
- + "Attack2:" + Bright.Common.StringUtil.CollectionToString(Attack2) + ","
- + "}";
- }
-
- partial void PostInit();
- partial void PostResolve();
- }
- }
|