SingleCreateEnemyConfig.cs 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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["WaveName"].IsString) { throw new SerializationException(); } WaveName = _json["WaveName"]; }
  18. { if(!_json["WaveTime"].IsNumber) { throw new SerializationException(); } WaveTime = _json["WaveTime"]; }
  19. { if(!_json["AttackRatio"].IsNumber) { throw new SerializationException(); } AttackRatio = _json["AttackRatio"]; }
  20. { if(!_json["SpeedRatio"].IsNumber) { throw new SerializationException(); } SpeedRatio = _json["SpeedRatio"]; }
  21. { if(!_json["HPRatio"].IsNumber) { throw new SerializationException(); } HPRatio = _json["HPRatio"]; }
  22. { if(!_json["EnemyName"].IsString) { throw new SerializationException(); } EnemyName = _json["EnemyName"]; }
  23. { 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); } }
  24. { if(!_json["StartTime"].IsNumber) { throw new SerializationException(); } StartTime = _json["StartTime"]; }
  25. { if(!_json["EndTime"].IsNumber) { throw new SerializationException(); } EndTime = _json["EndTime"]; }
  26. { if(!_json["Count"].IsNumber) { throw new SerializationException(); } Count = _json["Count"]; }
  27. { if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; }
  28. { if(!_json["BuildingHP"].IsNumber) { throw new SerializationException(); } BuildingHP = _json["BuildingHP"]; }
  29. { if(!_json["BuildingID"].IsNumber) { throw new SerializationException(); } BuildingID = _json["BuildingID"]; }
  30. PostInit();
  31. }
  32. public SingleCreateEnemyConfig(string WaveName, int WaveTime, float AttackRatio, float SpeedRatio, float HPRatio, string EnemyName, System.Collections.Generic.List<int> Position, int StartTime, int EndTime, int Count, int Type, float BuildingHP, int BuildingID )
  33. {
  34. this.WaveName = WaveName;
  35. this.WaveTime = WaveTime;
  36. this.AttackRatio = AttackRatio;
  37. this.SpeedRatio = SpeedRatio;
  38. this.HPRatio = HPRatio;
  39. this.EnemyName = EnemyName;
  40. this.Position = Position;
  41. this.StartTime = StartTime;
  42. this.EndTime = EndTime;
  43. this.Count = Count;
  44. this.Type = Type;
  45. this.BuildingHP = BuildingHP;
  46. this.BuildingID = BuildingID;
  47. PostInit();
  48. }
  49. public static SingleCreateEnemyConfig DeserializeSingleCreateEnemyConfig(JSONNode _json)
  50. {
  51. return new SingleCreateEnemyConfig(_json);
  52. }
  53. /// <summary>
  54. /// 表格参数:
  55. /// </summary>
  56. public string WaveName { get; private set; }
  57. /// <summary>
  58. /// 宽
  59. /// </summary>
  60. public int WaveTime { get; private set; }
  61. /// <summary>
  62. /// 高
  63. /// </summary>
  64. public float AttackRatio { get; private set; }
  65. public float SpeedRatio { get; private set; }
  66. public float HPRatio { get; private set; }
  67. public string EnemyName { get; private set; }
  68. public System.Collections.Generic.List<int> Position { get; private set; }
  69. public int StartTime { get; private set; }
  70. public int EndTime { get; private set; }
  71. public int Count { get; private set; }
  72. public int Type { get; private set; }
  73. public float BuildingHP { get; private set; }
  74. public int BuildingID { get; private set; }
  75. public const int __ID__ = 691467974;
  76. public override int GetTypeId() => __ID__;
  77. public void Resolve(Dictionary<string, object> _tables)
  78. {
  79. PostResolve();
  80. }
  81. public void TranslateText(System.Func<string, string, string> translator)
  82. {
  83. }
  84. public override string ToString()
  85. {
  86. return "{ "
  87. + "WaveName:" + WaveName + ","
  88. + "WaveTime:" + WaveTime + ","
  89. + "AttackRatio:" + AttackRatio + ","
  90. + "SpeedRatio:" + SpeedRatio + ","
  91. + "HPRatio:" + HPRatio + ","
  92. + "EnemyName:" + EnemyName + ","
  93. + "Position:" + Bright.Common.StringUtil.CollectionToString(Position) + ","
  94. + "StartTime:" + StartTime + ","
  95. + "EndTime:" + EndTime + ","
  96. + "Count:" + Count + ","
  97. + "Type:" + Type + ","
  98. + "BuildingHP:" + BuildingHP + ","
  99. + "BuildingID:" + BuildingID + ","
  100. + "}";
  101. }
  102. partial void PostInit();
  103. partial void PostResolve();
  104. }
  105. }