SingleDynamicEnemyConfig.cs 4.2 KB

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