| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- //------------------------------------------------------------------------------
- // <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 SingleCreateEnemyConfig : Bright.Config.BeanBase
- {
- public SingleCreateEnemyConfig(JSONNode _json)
- {
- { if(!_json["LevelID"].IsNumber) { throw new SerializationException(); } LevelID = _json["LevelID"]; }
- { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
- { if(!_json["EnemyID"].IsNumber) { throw new SerializationException(); } EnemyID = _json["EnemyID"]; }
- { if(!_json["EnemyName"].IsString) { throw new SerializationException(); } EnemyName = _json["EnemyName"]; }
- { if(!_json["Count"].IsNumber) { throw new SerializationException(); } Count = _json["Count"]; }
- { if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; }
- { if(!_json["Time"].IsNumber) { throw new SerializationException(); } Time = _json["Time"]; }
- { if(!_json["BuildingHP"].IsNumber) { throw new SerializationException(); } BuildingHP = _json["BuildingHP"]; }
- { if(!_json["DelayTime"].IsNumber) { throw new SerializationException(); } DelayTime = _json["DelayTime"]; }
- { if(!_json["TimeInterval"].IsNumber) { throw new SerializationException(); } TimeInterval = _json["TimeInterval"]; }
- { var __json0 = _json["Position"]; if(!__json0.IsArray) { throw new SerializationException(); } Position = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Position.Add(__v0); } }
- { if(!_json["BuildingID"].IsNumber) { throw new SerializationException(); } BuildingID = _json["BuildingID"]; }
- { if(!_json["YRandomRange"].IsNumber) { throw new SerializationException(); } YRandomRange = _json["YRandomRange"]; }
- { if(!_json["ZRandomRange"].IsNumber) { throw new SerializationException(); } ZRandomRange = _json["ZRandomRange"]; }
- { if(!_json["AttackRatio"].IsNumber) { throw new SerializationException(); } AttackRatio = _json["AttackRatio"]; }
- { if(!_json["HPRatio"].IsNumber) { throw new SerializationException(); } HPRatio = _json["HPRatio"]; }
- PostInit();
- }
- public SingleCreateEnemyConfig(int LevelID, int ID, int EnemyID, string EnemyName, int Count, int Type, float Time, float BuildingHP, float DelayTime, float TimeInterval, System.Collections.Generic.List<float> Position, int BuildingID, float YRandomRange, float ZRandomRange, float AttackRatio, float HPRatio )
- {
- this.LevelID = LevelID;
- this.ID = ID;
- this.EnemyID = EnemyID;
- this.EnemyName = EnemyName;
- this.Count = Count;
- this.Type = Type;
- this.Time = Time;
- this.BuildingHP = BuildingHP;
- this.DelayTime = DelayTime;
- this.TimeInterval = TimeInterval;
- this.Position = Position;
- this.BuildingID = BuildingID;
- this.YRandomRange = YRandomRange;
- this.ZRandomRange = ZRandomRange;
- this.AttackRatio = AttackRatio;
- this.HPRatio = HPRatio;
- PostInit();
- }
- public static SingleCreateEnemyConfig DeserializeSingleCreateEnemyConfig(JSONNode _json)
- {
- return new SingleCreateEnemyConfig(_json);
- }
- /// <summary>
- /// 表格ID
- /// </summary>
- public int LevelID { get; private set; }
- /// <summary>
- /// 出怪波次
- /// </summary>
- public int ID { get; private set; }
- /// <summary>
- /// 怪物ID
- /// </summary>
- public int EnemyID { get; private set; }
- /// <summary>
- /// 怪物名称
- /// </summary>
- public string EnemyName { get; private set; }
- /// <summary>
- /// 怪物数量
- /// </summary>
- public int Count { get; private set; }
- /// <summary>
- /// 出怪位置类型<br/>(0:正常/1:建筑物)
- /// </summary>
- public int Type { get; private set; }
- /// <summary>
- /// 出怪时间
- /// </summary>
- public float Time { get; private set; }
- /// <summary>
- /// 建筑物剩余多少血量时刷怪(%)
- /// </summary>
- public float BuildingHP { get; private set; }
- /// <summary>
- /// 延迟多少时间刷怪
- /// </summary>
- public float DelayTime { get; private set; }
- /// <summary>
- /// 出怪时间间隔
- /// </summary>
- public float TimeInterval { get; private set; }
- /// <summary>
- /// 出怪位置
- /// </summary>
- public System.Collections.Generic.List<float> Position { get; private set; }
- /// <summary>
- /// 出怪的建筑物批次
- /// </summary>
- public int BuildingID { get; private set; }
- /// <summary>
- /// Y轴随机范围
- /// </summary>
- public float YRandomRange { get; private set; }
- /// <summary>
- /// Z轴随机范围
- /// </summary>
- public float ZRandomRange { get; private set; }
- /// <summary>
- /// 攻击力倍率
- /// </summary>
- public float AttackRatio { get; private set; }
- /// <summary>
- /// 血量倍率
- /// </summary>
- public float HPRatio { get; private set; }
- public const int __ID__ = 691467974;
- 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 "{ "
- + "LevelID:" + LevelID + ","
- + "ID:" + ID + ","
- + "EnemyID:" + EnemyID + ","
- + "EnemyName:" + EnemyName + ","
- + "Count:" + Count + ","
- + "Type:" + Type + ","
- + "Time:" + Time + ","
- + "BuildingHP:" + BuildingHP + ","
- + "DelayTime:" + DelayTime + ","
- + "TimeInterval:" + TimeInterval + ","
- + "Position:" + Bright.Common.StringUtil.CollectionToString(Position) + ","
- + "BuildingID:" + BuildingID + ","
- + "YRandomRange:" + YRandomRange + ","
- + "ZRandomRange:" + ZRandomRange + ","
- + "AttackRatio:" + AttackRatio + ","
- + "HPRatio:" + HPRatio + ","
- + "}";
- }
-
- partial void PostInit();
- partial void PostResolve();
- }
- }
|