| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- //------------------------------------------------------------------------------
- // <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 SingleDynamicEnemyConfig : Bright.Config.BeanBase
- {
- public SingleDynamicEnemyConfig(JSONNode _json)
- {
- { if(!_json["WaveID"].IsNumber) { throw new SerializationException(); } WaveID = _json["WaveID"]; }
- { if(!_json["WaveName"].IsString) { throw new SerializationException(); } WaveName = _json["WaveName"]; }
- { if(!_json["EnemyName"].IsString) { throw new SerializationException(); } EnemyName = _json["EnemyName"]; }
- { var __json0 = _json["Position"]; if(!__json0.IsArray) { throw new SerializationException(); } Position = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Position.Add(__v0); } }
- { if(!_json["StartTime"].IsNumber) { throw new SerializationException(); } StartTime = _json["StartTime"]; }
- { if(!_json["EndTime"].IsNumber) { throw new SerializationException(); } EndTime = _json["EndTime"]; }
- { if(!_json["Count"].IsNumber) { throw new SerializationException(); } Count = _json["Count"]; }
- { if(!_json["AttackRatio"].IsNumber) { throw new SerializationException(); } AttackRatio = _json["AttackRatio"]; }
- { if(!_json["SpeedRatio"].IsNumber) { throw new SerializationException(); } SpeedRatio = _json["SpeedRatio"]; }
- { if(!_json["HPRatio"].IsNumber) { throw new SerializationException(); } HPRatio = _json["HPRatio"]; }
- PostInit();
- }
- public SingleDynamicEnemyConfig(int WaveID, string WaveName, string EnemyName, System.Collections.Generic.List<int> Position, int StartTime, int EndTime, int Count, float AttackRatio, float SpeedRatio, float HPRatio )
- {
- this.WaveID = WaveID;
- this.WaveName = WaveName;
- this.EnemyName = EnemyName;
- this.Position = Position;
- this.StartTime = StartTime;
- this.EndTime = EndTime;
- this.Count = Count;
- this.AttackRatio = AttackRatio;
- this.SpeedRatio = SpeedRatio;
- this.HPRatio = HPRatio;
- PostInit();
- }
- public static SingleDynamicEnemyConfig DeserializeSingleDynamicEnemyConfig(JSONNode _json)
- {
- return new SingleDynamicEnemyConfig(_json);
- }
- /// <summary>
- /// 表格参数:
- /// </summary>
- public int WaveID { get; private set; }
- /// <summary>
- /// 宽:
- /// </summary>
- public string WaveName { get; private set; }
- /// <summary>
- /// 140
- /// </summary>
- public string EnemyName { get; private set; }
- public System.Collections.Generic.List<int> Position { get; private set; }
- public int StartTime { get; private set; }
- public int EndTime { get; private set; }
- public int Count { get; private set; }
- public float AttackRatio { get; private set; }
- public float SpeedRatio { get; private set; }
- public float HPRatio { get; private set; }
- public const int __ID__ = 1939625395;
- 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 "{ "
- + "WaveID:" + WaveID + ","
- + "WaveName:" + WaveName + ","
- + "EnemyName:" + EnemyName + ","
- + "Position:" + Bright.Common.StringUtil.CollectionToString(Position) + ","
- + "StartTime:" + StartTime + ","
- + "EndTime:" + EndTime + ","
- + "Count:" + Count + ","
- + "AttackRatio:" + AttackRatio + ","
- + "SpeedRatio:" + SpeedRatio + ","
- + "HPRatio:" + HPRatio + ","
- + "}";
- }
-
- partial void PostInit();
- partial void PostResolve();
- }
- }
|