| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- //------------------------------------------------------------------------------
- // <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["Name"].IsString) { throw new SerializationException(); } Name = _json["Name"]; }
- { if(!_json["SpriteName"].IsString) { throw new SerializationException(); } SpriteName = _json["SpriteName"]; }
- { if(!_json["Color"].IsString) { throw new SerializationException(); } Color = _json["Color"]; }
- { if(!_json["Type"].IsString) { throw new SerializationException(); } Type = _json["Type"]; }
- { if(!_json["EnemyPrefab"].IsString) { throw new SerializationException(); } EnemyPrefab = _json["EnemyPrefab"]; }
- { var __json0 = _json["Radius"]; if(!__json0.IsArray) { throw new SerializationException(); } Radius = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Radius.Add(__v0); } }
- { if(!_json["HP"].IsNumber) { throw new SerializationException(); } HP = _json["HP"]; }
- { if(!_json["AttackSummon"].IsNumber) { throw new SerializationException(); } AttackSummon = _json["AttackSummon"]; }
- { if(!_json["AttackMarch"].IsNumber) { throw new SerializationException(); } AttackMarch = _json["AttackMarch"]; }
- { if(!_json["MinMoveSpeed"].IsNumber) { throw new SerializationException(); } MinMoveSpeed = _json["MinMoveSpeed"]; }
- { if(!_json["MaxMoveSpeed"].IsNumber) { throw new SerializationException(); } MaxMoveSpeed = _json["MaxMoveSpeed"]; }
- PostInit();
- }
- public SingleEnemyConfig(string Name, string SpriteName, string Color, string Type, string EnemyPrefab, System.Collections.Generic.List<int> Radius, int HP, int AttackSummon, int AttackMarch, float MinMoveSpeed, float MaxMoveSpeed )
- {
- this.Name = Name;
- this.SpriteName = SpriteName;
- this.Color = Color;
- this.Type = Type;
- this.EnemyPrefab = EnemyPrefab;
- this.Radius = Radius;
- this.HP = HP;
- this.AttackSummon = AttackSummon;
- this.AttackMarch = AttackMarch;
- this.MinMoveSpeed = MinMoveSpeed;
- this.MaxMoveSpeed = MaxMoveSpeed;
- PostInit();
- }
- public static SingleEnemyConfig DeserializeSingleEnemyConfig(JSONNode _json)
- {
- return new SingleEnemyConfig(_json);
- }
- /// <summary>
- /// 角色类型汇总:
- /// </summary>
- public string Name { get; private set; }
- /// <summary>
- /// Enemy
- /// </summary>
- public string SpriteName { get; private set; }
- /// <summary>
- /// Tower
- /// </summary>
- public string Color { get; private set; }
- public string Type { get; private set; }
- public string EnemyPrefab { get; private set; }
- public System.Collections.Generic.List<int> Radius { get; private set; }
- public int HP { get; private set; }
- public int AttackSummon { get; private set; }
- public int AttackMarch { get; private set; }
- public float MinMoveSpeed { get; private set; }
- public float MaxMoveSpeed { 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 "{ "
- + "Name:" + Name + ","
- + "SpriteName:" + SpriteName + ","
- + "Color:" + Color + ","
- + "Type:" + Type + ","
- + "EnemyPrefab:" + EnemyPrefab + ","
- + "Radius:" + Bright.Common.StringUtil.CollectionToString(Radius) + ","
- + "HP:" + HP + ","
- + "AttackSummon:" + AttackSummon + ","
- + "AttackMarch:" + AttackMarch + ","
- + "MinMoveSpeed:" + MinMoveSpeed + ","
- + "MaxMoveSpeed:" + MaxMoveSpeed + ","
- + "}";
- }
-
- partial void PostInit();
- partial void PostResolve();
- }
- }
|