BoneData.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. using System;
  2. namespace Spine
  3. {
  4. public class BoneData
  5. {
  6. public BoneData(string name, BoneData parent)
  7. {
  8. if (name == null)
  9. {
  10. throw new ArgumentNullException("name cannot be null.");
  11. }
  12. this.name = name;
  13. this.parent = parent;
  14. }
  15. public BoneData Parent
  16. {
  17. get
  18. {
  19. return this.parent;
  20. }
  21. }
  22. public string Name
  23. {
  24. get
  25. {
  26. return this.name;
  27. }
  28. }
  29. public float Length
  30. {
  31. get
  32. {
  33. return this.length;
  34. }
  35. set
  36. {
  37. this.length = value;
  38. }
  39. }
  40. public float X
  41. {
  42. get
  43. {
  44. return this.x;
  45. }
  46. set
  47. {
  48. this.x = value;
  49. }
  50. }
  51. public float Y
  52. {
  53. get
  54. {
  55. return this.y;
  56. }
  57. set
  58. {
  59. this.y = value;
  60. }
  61. }
  62. public float Rotation
  63. {
  64. get
  65. {
  66. return this.rotation;
  67. }
  68. set
  69. {
  70. this.rotation = value;
  71. }
  72. }
  73. public float ScaleX
  74. {
  75. get
  76. {
  77. return this.scaleX;
  78. }
  79. set
  80. {
  81. this.scaleX = value;
  82. }
  83. }
  84. public float ScaleY
  85. {
  86. get
  87. {
  88. return this.scaleY;
  89. }
  90. set
  91. {
  92. this.scaleY = value;
  93. }
  94. }
  95. public bool FlipX
  96. {
  97. get
  98. {
  99. return this.flipX;
  100. }
  101. set
  102. {
  103. this.flipX = value;
  104. }
  105. }
  106. public bool FlipY
  107. {
  108. get
  109. {
  110. return this.flipY;
  111. }
  112. set
  113. {
  114. this.flipY = value;
  115. }
  116. }
  117. public bool InheritScale
  118. {
  119. get
  120. {
  121. return this.inheritScale;
  122. }
  123. set
  124. {
  125. this.inheritScale = value;
  126. }
  127. }
  128. public bool InheritRotation
  129. {
  130. get
  131. {
  132. return this.inheritRotation;
  133. }
  134. set
  135. {
  136. this.inheritRotation = value;
  137. }
  138. }
  139. public override string ToString()
  140. {
  141. return this.name;
  142. }
  143. internal BoneData parent;
  144. internal string name;
  145. internal float length;
  146. internal float x;
  147. internal float y;
  148. internal float rotation;
  149. internal float scaleX = 1f;
  150. internal float scaleY = 1f;
  151. internal bool flipX;
  152. internal bool flipY;
  153. internal bool inheritScale = true;
  154. internal bool inheritRotation = true;
  155. }
  156. }