SingleCreateBuildingConfig.cs 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. // Changes to this file may cause incorrect behavior and will be lost if
  5. // the code is regenerated.
  6. // </auto-generated>
  7. //------------------------------------------------------------------------------
  8. using Bright.Serialization;
  9. using System.Collections.Generic;
  10. using SimpleJSON;
  11. namespace cfg
  12. {
  13. public sealed partial class SingleCreateBuildingConfig : Bright.Config.BeanBase
  14. {
  15. public SingleCreateBuildingConfig(JSONNode _json)
  16. {
  17. { if(!_json["LevelID"].IsNumber) { throw new SerializationException(); } LevelID = _json["LevelID"]; }
  18. { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
  19. { if(!_json["BuildingID"].IsNumber) { throw new SerializationException(); } BuildingID = _json["BuildingID"]; }
  20. { if(!_json["PositionType"].IsNumber) { throw new SerializationException(); } PositionType = _json["PositionType"]; }
  21. { if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; }
  22. { if(!_json["Time"].IsNumber) { throw new SerializationException(); } Time = _json["Time"]; }
  23. { if(!_json["RefreshBuildingHP"].IsNumber) { throw new SerializationException(); } RefreshBuildingHP = _json["RefreshBuildingHP"]; }
  24. { if(!_json["DelayTime"].IsNumber) { throw new SerializationException(); } DelayTime = _json["DelayTime"]; }
  25. { if(!_json["RefreshBuildingID"].IsNumber) { throw new SerializationException(); } RefreshBuildingID = _json["RefreshBuildingID"]; }
  26. { 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); } }
  27. { 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); } }
  28. { 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); } }
  29. { if(!_json["AttackRatio"].IsNumber) { throw new SerializationException(); } AttackRatio = _json["AttackRatio"]; }
  30. { if(!_json["HPRatio"].IsNumber) { throw new SerializationException(); } HPRatio = _json["HPRatio"]; }
  31. { if(!_json["DisappearTime"].IsNumber) { throw new SerializationException(); } DisappearTime = _json["DisappearTime"]; }
  32. PostInit();
  33. }
  34. 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 )
  35. {
  36. this.LevelID = LevelID;
  37. this.ID = ID;
  38. this.BuildingID = BuildingID;
  39. this.PositionType = PositionType;
  40. this.Type = Type;
  41. this.Time = Time;
  42. this.RefreshBuildingHP = RefreshBuildingHP;
  43. this.DelayTime = DelayTime;
  44. this.RefreshBuildingID = RefreshBuildingID;
  45. this.Position = Position;
  46. this.Position1 = Position1;
  47. this.Scale = Scale;
  48. this.AttackRatio = AttackRatio;
  49. this.HPRatio = HPRatio;
  50. this.DisappearTime = DisappearTime;
  51. PostInit();
  52. }
  53. public static SingleCreateBuildingConfig DeserializeSingleCreateBuildingConfig(JSONNode _json)
  54. {
  55. return new SingleCreateBuildingConfig(_json);
  56. }
  57. /// <summary>
  58. /// 关卡ID
  59. /// </summary>
  60. public int LevelID { get; private set; }
  61. /// <summary>
  62. /// 刷新批次
  63. /// </summary>
  64. public int ID { get; private set; }
  65. /// <summary>
  66. /// 建筑物ID
  67. /// </summary>
  68. public int BuildingID { get; private set; }
  69. /// <summary>
  70. /// 刷新建筑物位置类型<br/>(0:正常/1:建筑物)
  71. /// </summary>
  72. public int PositionType { get; private set; }
  73. /// <summary>
  74. /// 建筑物类型<br/>(0:传送门/1:敌方防御塔)
  75. /// </summary>
  76. public int Type { get; private set; }
  77. /// <summary>
  78. /// 刷新时间
  79. /// </summary>
  80. public float Time { get; private set; }
  81. /// <summary>
  82. /// 建筑物剩余多少血量时刷(%)
  83. /// </summary>
  84. public float RefreshBuildingHP { get; private set; }
  85. /// <summary>
  86. /// 延迟多少时间刷
  87. /// </summary>
  88. public float DelayTime { get; private set; }
  89. /// <summary>
  90. /// 建筑物批次
  91. /// </summary>
  92. public int RefreshBuildingID { get; private set; }
  93. /// <summary>
  94. /// 刷新位置
  95. /// </summary>
  96. public System.Collections.Generic.List<float> Position { get; private set; }
  97. /// <summary>
  98. /// 第二扇传送门刷新位置
  99. /// </summary>
  100. public System.Collections.Generic.List<float> Position1 { get; private set; }
  101. /// <summary>
  102. /// 传送门朝向<br/>(-1朝右,1朝左)
  103. /// </summary>
  104. public System.Collections.Generic.List<float> Scale { get; private set; }
  105. /// <summary>
  106. /// 攻击力倍率
  107. /// </summary>
  108. public float AttackRatio { get; private set; }
  109. /// <summary>
  110. /// 血量倍率
  111. /// </summary>
  112. public float HPRatio { get; private set; }
  113. /// <summary>
  114. /// 消失时间
  115. /// </summary>
  116. public float DisappearTime { get; private set; }
  117. public const int __ID__ = 2141851578;
  118. public override int GetTypeId() => __ID__;
  119. public void Resolve(Dictionary<string, object> _tables)
  120. {
  121. PostResolve();
  122. }
  123. public void TranslateText(System.Func<string, string, string> translator)
  124. {
  125. }
  126. public override string ToString()
  127. {
  128. return "{ "
  129. + "LevelID:" + LevelID + ","
  130. + "ID:" + ID + ","
  131. + "BuildingID:" + BuildingID + ","
  132. + "PositionType:" + PositionType + ","
  133. + "Type:" + Type + ","
  134. + "Time:" + Time + ","
  135. + "RefreshBuildingHP:" + RefreshBuildingHP + ","
  136. + "DelayTime:" + DelayTime + ","
  137. + "RefreshBuildingID:" + RefreshBuildingID + ","
  138. + "Position:" + Bright.Common.StringUtil.CollectionToString(Position) + ","
  139. + "Position1:" + Bright.Common.StringUtil.CollectionToString(Position1) + ","
  140. + "Scale:" + Bright.Common.StringUtil.CollectionToString(Scale) + ","
  141. + "AttackRatio:" + AttackRatio + ","
  142. + "HPRatio:" + HPRatio + ","
  143. + "DisappearTime:" + DisappearTime + ","
  144. + "}";
  145. }
  146. partial void PostInit();
  147. partial void PostResolve();
  148. }
  149. }