SingleCreateEnemyConfig.cs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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 SingleCreateEnemyConfig : Bright.Config.BeanBase
  14. {
  15. public SingleCreateEnemyConfig(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["EnemyID"].IsNumber) { throw new SerializationException(); } EnemyID = _json["EnemyID"]; }
  20. { if(!_json["EnemyName"].IsString) { throw new SerializationException(); } EnemyName = _json["EnemyName"]; }
  21. { if(!_json["Count"].IsNumber) { throw new SerializationException(); } Count = _json["Count"]; }
  22. { if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; }
  23. { if(!_json["Time"].IsNumber) { throw new SerializationException(); } Time = _json["Time"]; }
  24. { if(!_json["BuildingHP"].IsNumber) { throw new SerializationException(); } BuildingHP = _json["BuildingHP"]; }
  25. { if(!_json["DelayTime"].IsNumber) { throw new SerializationException(); } DelayTime = _json["DelayTime"]; }
  26. { if(!_json["TimeInterval"].IsNumber) { throw new SerializationException(); } TimeInterval = _json["TimeInterval"]; }
  27. { 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); } }
  28. { if(!_json["BuildingID"].IsNumber) { throw new SerializationException(); } BuildingID = _json["BuildingID"]; }
  29. { if(!_json["YRandomRange"].IsNumber) { throw new SerializationException(); } YRandomRange = _json["YRandomRange"]; }
  30. { if(!_json["ZRandomRange"].IsNumber) { throw new SerializationException(); } ZRandomRange = _json["ZRandomRange"]; }
  31. { if(!_json["AttackRatio"].IsNumber) { throw new SerializationException(); } AttackRatio = _json["AttackRatio"]; }
  32. { if(!_json["HPRatio"].IsNumber) { throw new SerializationException(); } HPRatio = _json["HPRatio"]; }
  33. PostInit();
  34. }
  35. 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 )
  36. {
  37. this.LevelID = LevelID;
  38. this.ID = ID;
  39. this.EnemyID = EnemyID;
  40. this.EnemyName = EnemyName;
  41. this.Count = Count;
  42. this.Type = Type;
  43. this.Time = Time;
  44. this.BuildingHP = BuildingHP;
  45. this.DelayTime = DelayTime;
  46. this.TimeInterval = TimeInterval;
  47. this.Position = Position;
  48. this.BuildingID = BuildingID;
  49. this.YRandomRange = YRandomRange;
  50. this.ZRandomRange = ZRandomRange;
  51. this.AttackRatio = AttackRatio;
  52. this.HPRatio = HPRatio;
  53. PostInit();
  54. }
  55. public static SingleCreateEnemyConfig DeserializeSingleCreateEnemyConfig(JSONNode _json)
  56. {
  57. return new SingleCreateEnemyConfig(_json);
  58. }
  59. /// <summary>
  60. /// 表格ID
  61. /// </summary>
  62. public int LevelID { get; private set; }
  63. /// <summary>
  64. /// 出怪波次
  65. /// </summary>
  66. public int ID { get; private set; }
  67. /// <summary>
  68. /// 怪物ID
  69. /// </summary>
  70. public int EnemyID { get; private set; }
  71. /// <summary>
  72. /// 怪物名称
  73. /// </summary>
  74. public string EnemyName { get; private set; }
  75. /// <summary>
  76. /// 怪物数量
  77. /// </summary>
  78. public int Count { get; private set; }
  79. /// <summary>
  80. /// 出怪位置类型<br/>(0:正常/1:建筑物)
  81. /// </summary>
  82. public int Type { get; private set; }
  83. /// <summary>
  84. /// 出怪时间
  85. /// </summary>
  86. public float Time { get; private set; }
  87. /// <summary>
  88. /// 建筑物剩余多少血量时刷怪(%)
  89. /// </summary>
  90. public float BuildingHP { get; private set; }
  91. /// <summary>
  92. /// 延迟多少时间刷怪
  93. /// </summary>
  94. public float DelayTime { get; private set; }
  95. /// <summary>
  96. /// 出怪时间间隔
  97. /// </summary>
  98. public float TimeInterval { get; private set; }
  99. /// <summary>
  100. /// 出怪位置
  101. /// </summary>
  102. public System.Collections.Generic.List<float> Position { get; private set; }
  103. /// <summary>
  104. /// 出怪的建筑物批次
  105. /// </summary>
  106. public int BuildingID { get; private set; }
  107. /// <summary>
  108. /// Y轴随机范围
  109. /// </summary>
  110. public float YRandomRange { get; private set; }
  111. /// <summary>
  112. /// Z轴随机范围
  113. /// </summary>
  114. public float ZRandomRange { get; private set; }
  115. /// <summary>
  116. /// 攻击力倍率
  117. /// </summary>
  118. public float AttackRatio { get; private set; }
  119. /// <summary>
  120. /// 血量倍率
  121. /// </summary>
  122. public float HPRatio { get; private set; }
  123. public const int __ID__ = 691467974;
  124. public override int GetTypeId() => __ID__;
  125. public void Resolve(Dictionary<string, object> _tables)
  126. {
  127. PostResolve();
  128. }
  129. public void TranslateText(System.Func<string, string, string> translator)
  130. {
  131. }
  132. public override string ToString()
  133. {
  134. return "{ "
  135. + "LevelID:" + LevelID + ","
  136. + "ID:" + ID + ","
  137. + "EnemyID:" + EnemyID + ","
  138. + "EnemyName:" + EnemyName + ","
  139. + "Count:" + Count + ","
  140. + "Type:" + Type + ","
  141. + "Time:" + Time + ","
  142. + "BuildingHP:" + BuildingHP + ","
  143. + "DelayTime:" + DelayTime + ","
  144. + "TimeInterval:" + TimeInterval + ","
  145. + "Position:" + Bright.Common.StringUtil.CollectionToString(Position) + ","
  146. + "BuildingID:" + BuildingID + ","
  147. + "YRandomRange:" + YRandomRange + ","
  148. + "ZRandomRange:" + ZRandomRange + ","
  149. + "AttackRatio:" + AttackRatio + ","
  150. + "HPRatio:" + HPRatio + ","
  151. + "}";
  152. }
  153. partial void PostInit();
  154. partial void PostResolve();
  155. }
  156. }