| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- //------------------------------------------------------------------------------
- // <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 SingleCreateBuildingConfig : Bright.Config.BeanBase
- {
- public SingleCreateBuildingConfig(JSONNode _json)
- {
- { if(!_json["LevelID"].IsNumber) { throw new SerializationException(); } LevelID = _json["LevelID"]; }
- { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
- { if(!_json["BuildingID"].IsNumber) { throw new SerializationException(); } BuildingID = _json["BuildingID"]; }
- { if(!_json["PositionType"].IsNumber) { throw new SerializationException(); } PositionType = _json["PositionType"]; }
- { if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; }
- { if(!_json["Time"].IsNumber) { throw new SerializationException(); } Time = _json["Time"]; }
- { if(!_json["RefreshBuildingHP"].IsNumber) { throw new SerializationException(); } RefreshBuildingHP = _json["RefreshBuildingHP"]; }
- { if(!_json["DelayTime"].IsNumber) { throw new SerializationException(); } DelayTime = _json["DelayTime"]; }
- { if(!_json["RefreshBuildingID"].IsNumber) { throw new SerializationException(); } RefreshBuildingID = _json["RefreshBuildingID"]; }
- { 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); } }
- { var __json0 = _json["Position1"]; if(!__json0.IsArray) { throw new SerializationException(); } Position1 = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Position1.Add(__v0); } }
- { var __json0 = _json["Scale"]; if(!__json0.IsArray) { throw new SerializationException(); } Scale = new System.Collections.Generic.List<float>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { float __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Scale.Add(__v0); } }
- { if(!_json["AttackRatio"].IsNumber) { throw new SerializationException(); } AttackRatio = _json["AttackRatio"]; }
- { if(!_json["HPRatio"].IsNumber) { throw new SerializationException(); } HPRatio = _json["HPRatio"]; }
- { if(!_json["DisappearTime"].IsNumber) { throw new SerializationException(); } DisappearTime = _json["DisappearTime"]; }
- PostInit();
- }
- public SingleCreateBuildingConfig(int LevelID, int ID, int BuildingID, int PositionType, int Type, float Time, float RefreshBuildingHP, float DelayTime, int RefreshBuildingID, System.Collections.Generic.List<float> Position, System.Collections.Generic.List<float> Position1, System.Collections.Generic.List<float> Scale, float AttackRatio, float HPRatio, float DisappearTime )
- {
- this.LevelID = LevelID;
- this.ID = ID;
- this.BuildingID = BuildingID;
- this.PositionType = PositionType;
- this.Type = Type;
- this.Time = Time;
- this.RefreshBuildingHP = RefreshBuildingHP;
- this.DelayTime = DelayTime;
- this.RefreshBuildingID = RefreshBuildingID;
- this.Position = Position;
- this.Position1 = Position1;
- this.Scale = Scale;
- this.AttackRatio = AttackRatio;
- this.HPRatio = HPRatio;
- this.DisappearTime = DisappearTime;
- PostInit();
- }
- public static SingleCreateBuildingConfig DeserializeSingleCreateBuildingConfig(JSONNode _json)
- {
- return new SingleCreateBuildingConfig(_json);
- }
- /// <summary>
- /// 关卡ID
- /// </summary>
- public int LevelID { get; private set; }
- /// <summary>
- /// 刷新批次
- /// </summary>
- public int ID { get; private set; }
- /// <summary>
- /// 建筑物ID
- /// </summary>
- public int BuildingID { get; private set; }
- /// <summary>
- /// 刷新建筑物位置类型<br/>(0:正常/1:建筑物)
- /// </summary>
- public int PositionType { 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 RefreshBuildingHP { get; private set; }
- /// <summary>
- /// 延迟多少时间刷
- /// </summary>
- public float DelayTime { get; private set; }
- /// <summary>
- /// 建筑物批次
- /// </summary>
- public int RefreshBuildingID { get; private set; }
- /// <summary>
- /// 刷新位置
- /// </summary>
- public System.Collections.Generic.List<float> Position { get; private set; }
- /// <summary>
- /// 第二扇传送门刷新位置
- /// </summary>
- public System.Collections.Generic.List<float> Position1 { get; private set; }
- /// <summary>
- /// 传送门朝向<br/>(-1朝右,1朝左)
- /// </summary>
- public System.Collections.Generic.List<float> Scale { get; private set; }
- /// <summary>
- /// 攻击力倍率
- /// </summary>
- public float AttackRatio { get; private set; }
- /// <summary>
- /// 血量倍率
- /// </summary>
- public float HPRatio { get; private set; }
- /// <summary>
- /// 消失时间
- /// </summary>
- public float DisappearTime { get; private set; }
- public const int __ID__ = 2141851578;
- 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 + ","
- + "BuildingID:" + BuildingID + ","
- + "PositionType:" + PositionType + ","
- + "Type:" + Type + ","
- + "Time:" + Time + ","
- + "RefreshBuildingHP:" + RefreshBuildingHP + ","
- + "DelayTime:" + DelayTime + ","
- + "RefreshBuildingID:" + RefreshBuildingID + ","
- + "Position:" + Bright.Common.StringUtil.CollectionToString(Position) + ","
- + "Position1:" + Bright.Common.StringUtil.CollectionToString(Position1) + ","
- + "Scale:" + Bright.Common.StringUtil.CollectionToString(Scale) + ","
- + "AttackRatio:" + AttackRatio + ","
- + "HPRatio:" + HPRatio + ","
- + "DisappearTime:" + DisappearTime + ","
- + "}";
- }
-
- partial void PostInit();
- partial void PostResolve();
- }
- }
|