Newer
Older
DungeonShooting / DungeonShooting_Godot / src / config / ExcelConfig_ActivityMaterial.cs
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3.  
  4. namespace Config;
  5.  
  6. public static partial class ExcelConfig
  7. {
  8. public class ActivityMaterial
  9. {
  10. /// <summary>
  11. /// 表Id
  12. /// </summary>
  13. [JsonInclude]
  14. public string Id;
  15.  
  16. /// <summary>
  17. /// 备注
  18. /// </summary>
  19. [JsonInclude]
  20. public string Remark;
  21.  
  22. /// <summary>
  23. /// 摩擦力
  24. /// </summary>
  25. [JsonInclude]
  26. public float Friction;
  27.  
  28. /// <summary>
  29. /// 重力缩放,如果为0则会关闭重力
  30. /// </summary>
  31. [JsonInclude]
  32. public float GravityScale;
  33.  
  34. /// <summary>
  35. /// 物体旋转控制类型: <br/>
  36. /// 0.不受运动影响 <br/>
  37. /// 1.只受水平方向运动速度影响 <br/>
  38. /// 2.受水平和垂直运动方向影响, 可以做迫击炮炮弹的效果
  39. /// </summary>
  40. [JsonInclude]
  41. public byte RotationType;
  42.  
  43. /// <summary>
  44. /// 旋转摩擦力
  45. /// </summary>
  46. [JsonInclude]
  47. public float RotationFriction;
  48.  
  49. /// <summary>
  50. /// 落地之后是否回弹
  51. /// </summary>
  52. [JsonInclude]
  53. public bool Bounce;
  54.  
  55. /// <summary>
  56. /// 物体水平回弹强度
  57. /// </summary>
  58. [JsonInclude]
  59. public float BounceStrength;
  60.  
  61. /// <summary>
  62. /// 物体下坠回弹的强度
  63. /// </summary>
  64. [JsonInclude]
  65. public float FallBounceStrength;
  66.  
  67. /// <summary>
  68. /// 物体下坠回弹后的运动速度衰比例
  69. /// </summary>
  70. [JsonInclude]
  71. public float FallBounceSpeed;
  72.  
  73. /// <summary>
  74. /// 物体下坠回弹后的旋转速度衰减比例
  75. /// </summary>
  76. [JsonInclude]
  77. public float FallBounceRotation;
  78.  
  79. /// <summary>
  80. /// 动态开关碰撞器,在物体高度大于16时是否关闭碰撞检测
  81. /// </summary>
  82. [JsonInclude]
  83. public bool DynamicCollision;
  84.  
  85. /// <summary>
  86. /// 返回浅拷贝出的新对象
  87. /// </summary>
  88. public ActivityMaterial Clone()
  89. {
  90. var inst = new ActivityMaterial();
  91. inst.Id = Id;
  92. inst.Remark = Remark;
  93. inst.Friction = Friction;
  94. inst.GravityScale = GravityScale;
  95. inst.RotationType = RotationType;
  96. inst.RotationFriction = RotationFriction;
  97. inst.Bounce = Bounce;
  98. inst.BounceStrength = BounceStrength;
  99. inst.FallBounceStrength = FallBounceStrength;
  100. inst.FallBounceSpeed = FallBounceSpeed;
  101. inst.FallBounceRotation = FallBounceRotation;
  102. inst.DynamicCollision = DynamicCollision;
  103. return inst;
  104. }
  105. }
  106. }