SABoneColliderCommon.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. using System;
  2. public class SABoneColliderCommon
  3. {
  4. public enum BoneWeightType
  5. {
  6. Bone2,
  7. Bone4
  8. }
  9. public enum BoneTriangleExtent
  10. {
  11. Disable,
  12. Vertex2,
  13. Vertex1
  14. }
  15. [Serializable]
  16. public class BoneProperty
  17. {
  18. public SABoneColliderCommon.BoneProperty ShallowCopy()
  19. {
  20. return (SABoneColliderCommon.BoneProperty)base.MemberwiseClone();
  21. }
  22. public bool recursivery;
  23. }
  24. [Serializable]
  25. public class SplitProperty
  26. {
  27. public SABoneColliderCommon.SplitProperty ShallowCopy()
  28. {
  29. return (SABoneColliderCommon.SplitProperty)base.MemberwiseClone();
  30. }
  31. public SABoneColliderCommon.BoneWeightType boneWeightType;
  32. public int boneWeight2 = 50;
  33. public int boneWeight3 = 33;
  34. public int boneWeight4 = 25;
  35. public bool greaterBoneWeight = true;
  36. public SABoneColliderCommon.BoneTriangleExtent boneTriangleExtent = SABoneColliderCommon.BoneTriangleExtent.Vertex2;
  37. }
  38. [Serializable]
  39. public class SABoneColliderProperty
  40. {
  41. public SABoneColliderCommon.SABoneColliderProperty Copy()
  42. {
  43. SABoneColliderCommon.SABoneColliderProperty saboneColliderProperty = new SABoneColliderCommon.SABoneColliderProperty();
  44. if (this.boneProperty != null)
  45. {
  46. saboneColliderProperty.boneProperty = this.boneProperty.ShallowCopy();
  47. }
  48. if (this.splitProperty != null)
  49. {
  50. saboneColliderProperty.splitProperty = this.splitProperty.ShallowCopy();
  51. }
  52. if (this.reducerProperty != null)
  53. {
  54. saboneColliderProperty.reducerProperty = this.reducerProperty.ShallowCopy();
  55. }
  56. if (this.colliderProperty != null)
  57. {
  58. saboneColliderProperty.colliderProperty = this.colliderProperty.ShallowCopy();
  59. }
  60. if (this.rigidbodyProperty != null)
  61. {
  62. saboneColliderProperty.rigidbodyProperty = this.rigidbodyProperty.ShallowCopy();
  63. }
  64. saboneColliderProperty.modifyNameEnabled = this.modifyNameEnabled;
  65. return saboneColliderProperty;
  66. }
  67. public SABoneColliderCommon.BoneProperty boneProperty = new SABoneColliderCommon.BoneProperty();
  68. public SABoneColliderCommon.SplitProperty splitProperty = new SABoneColliderCommon.SplitProperty();
  69. public SAColliderBuilderCommon.ReducerProperty reducerProperty = new SAColliderBuilderCommon.ReducerProperty();
  70. public SAColliderBuilderCommon.ColliderProperty colliderProperty = new SAColliderBuilderCommon.ColliderProperty();
  71. public SAColliderBuilderCommon.RigidbodyProperty rigidbodyProperty = new SAColliderBuilderCommon.RigidbodyProperty();
  72. public bool modifyNameEnabled;
  73. }
  74. [Serializable]
  75. public class SABoneColliderBuilderProperty
  76. {
  77. public SABoneColliderCommon.SABoneColliderBuilderProperty Copy()
  78. {
  79. SABoneColliderCommon.SABoneColliderBuilderProperty saboneColliderBuilderProperty = new SABoneColliderCommon.SABoneColliderBuilderProperty();
  80. if (this.splitProperty != null)
  81. {
  82. saboneColliderBuilderProperty.splitProperty = this.splitProperty.ShallowCopy();
  83. }
  84. if (this.reducerProperty != null)
  85. {
  86. saboneColliderBuilderProperty.reducerProperty = this.reducerProperty.ShallowCopy();
  87. }
  88. if (this.colliderProperty != null)
  89. {
  90. saboneColliderBuilderProperty.colliderProperty = this.colliderProperty.ShallowCopy();
  91. }
  92. if (this.rigidbodyProperty != null)
  93. {
  94. saboneColliderBuilderProperty.rigidbodyProperty = this.rigidbodyProperty.ShallowCopy();
  95. }
  96. saboneColliderBuilderProperty.modifyNameEnabled = this.modifyNameEnabled;
  97. return saboneColliderBuilderProperty;
  98. }
  99. public SABoneColliderCommon.SABoneColliderProperty ToSABoneColliderProperty()
  100. {
  101. SABoneColliderCommon.SABoneColliderProperty saboneColliderProperty = new SABoneColliderCommon.SABoneColliderProperty();
  102. if (this.splitProperty != null)
  103. {
  104. saboneColliderProperty.splitProperty = this.splitProperty.ShallowCopy();
  105. }
  106. if (this.reducerProperty != null)
  107. {
  108. saboneColliderProperty.reducerProperty = this.reducerProperty.ShallowCopy();
  109. }
  110. if (this.colliderProperty != null)
  111. {
  112. saboneColliderProperty.colliderProperty = this.colliderProperty.ShallowCopy();
  113. }
  114. if (this.rigidbodyProperty != null)
  115. {
  116. saboneColliderProperty.rigidbodyProperty = this.rigidbodyProperty.ShallowCopy();
  117. }
  118. saboneColliderProperty.modifyNameEnabled = this.modifyNameEnabled;
  119. return saboneColliderProperty;
  120. }
  121. public SABoneColliderCommon.SplitProperty splitProperty = new SABoneColliderCommon.SplitProperty();
  122. public SAColliderBuilderCommon.ReducerProperty reducerProperty = new SAColliderBuilderCommon.ReducerProperty();
  123. public SAColliderBuilderCommon.ColliderProperty colliderProperty = new SAColliderBuilderCommon.ColliderProperty();
  124. public SAColliderBuilderCommon.RigidbodyProperty rigidbodyProperty = new SAColliderBuilderCommon.RigidbodyProperty();
  125. public bool modifyNameEnabled;
  126. }
  127. }