Răsfoiți Sursa

Removed unnecessary cast, property access.

NathanSweet 11 ani în urmă
părinte
comite
386134febe
1 a modificat fișierele cu 6 adăugiri și 6 ștergeri
  1. 6 6
      spine-csharp/src/Attachments/SkinnedMeshAttachment.cs

+ 6 - 6
spine-csharp/src/Attachments/SkinnedMeshAttachment.cs

@@ -102,10 +102,10 @@ namespace Spine {
 					float wx = 0, wy = 0;
 					int nn = bones[v++] + v;
 					for (; v < nn; v++, b += 3) {
-						Bone bone = (Bone)skeletonBones[bones[v]];
+						Bone bone = skeletonBones[bones[v]];
 						float vx = weights[b], vy = weights[b + 1], weight = weights[b + 2];
-						wx += (vx * bone.M00 + vy * bone.M01 + bone.worldX) * weight;
-						wy += (vx * bone.M10 + vy * bone.M11 + bone.worldY) * weight;
+						wx += (vx * bone.m00 + vy * bone.m01 + bone.worldX) * weight;
+						wy += (vx * bone.m10 + vy * bone.m11 + bone.worldY) * weight;
 					}
 					worldVertices[w] = wx + x;
 					worldVertices[w + 1] = wy + y;
@@ -116,10 +116,10 @@ namespace Spine {
 					float wx = 0, wy = 0;
 					int nn = bones[v++] + v;
 					for (; v < nn; v++, b += 3, f += 2) {
-						Bone bone = (Bone)skeletonBones[bones[v]];
+						Bone bone = skeletonBones[bones[v]];
 						float vx = weights[b] + ffd[f], vy = weights[b + 1] + ffd[f + 1], weight = weights[b + 2];
-						wx += (vx * bone.M00 + vy * bone.M01 + bone.worldX) * weight;
-						wy += (vx * bone.M10 + vy * bone.M11 + bone.worldY) * weight;
+						wx += (vx * bone.m00 + vy * bone.m01 + bone.worldX) * weight;
+						wy += (vx * bone.m10 + vy * bone.m11 + bone.worldY) * weight;
 					}
 					worldVertices[w] = wx + x;
 					worldVertices[w + 1] = wy + y;