Browse Source

Minor updates.

NathanSweet 12 years ago
parent
commit
1db0e71257

+ 1 - 1
spine-csharp/src/Attachments/BoundingBoxAttachment.cs

@@ -34,7 +34,7 @@ namespace Spine {
 			: base(name) {
 		}
 
-		/** @param worldVertices Must have at least the same as this attachment's vertices. */
+		/** @param worldVertices Must have at least the same length as this attachment's vertices. */
 		public void ComputeWorldVertices (float x, float y, Bone bone, float[] worldVertices) {
 			x += bone.WorldX;
 			y += bone.WorldY;

+ 6 - 4
spine-csharp/src/SkeletonBounds.cs

@@ -107,9 +107,8 @@ namespace Spine {
 			float x = skeleton.X, y = skeleton.Y;
 
 			boundingBoxes.Clear();
-			foreach (Polygon polygon in polygons) {
+			foreach (Polygon polygon in polygons)
 				polygonPool.Add(polygon);
-			}
 			polygons.Clear();
 
 			for (int i = 0; i < slotCount; i++) {
@@ -127,7 +126,7 @@ namespace Spine {
 					polygon = new Polygon();
 				polygons.Add(polygon);
 				polygon.Count = boundingBox.Vertices.Length;
-				if (polygon.Vertices == null || polygon.Vertices.Length < polygon.Count) polygon.Vertices = new float[polygon.Count];
+				if (polygon.Vertices.Length < polygon.Count) polygon.Vertices = new float[polygon.Count];
 				boundingBox.ComputeWorldVertices(x, y, slot.Bone, polygon.Vertices);
 			}
 		}
@@ -262,7 +261,6 @@ namespace Spine {
 				}
 				x3 = x4;
 				y3 = y4;
-
 			}
 			return false;
 		}
@@ -272,4 +270,8 @@ namespace Spine {
 public class Polygon {
 	public float[] Vertices { get; set; }
 	public int Count { get; set; }
+
+	public Polygon () {
+		Vertices = new float[16];
+	}
 }

File diff suppressed because it is too large
+ 0 - 0
spine-xna/example/data/spineboy.json


Some files were not shown because too many files changed in this diff