ソースを参照

[csharp] Minor cleanup.

pharan 7 年 前
コミット
7e910cb8f7
2 ファイル変更3 行追加7 行削除
  1. 3 3
      spine-csharp/src/AnimationStateData.cs
  2. 0 4
      spine-csharp/src/Bone.cs

+ 3 - 3
spine-csharp/src/AnimationStateData.cs

@@ -47,16 +47,16 @@ namespace Spine {
 		public float DefaultMix { get { return defaultMix; } set { defaultMix = value; } }
 
 		public AnimationStateData (SkeletonData skeletonData) {
-			if (skeletonData == null) throw new ArgumentException ("skeletonData cannot be null.");
+			if (skeletonData == null) throw new ArgumentException("skeletonData cannot be null.", "skeletonData");
 			this.skeletonData = skeletonData;
 		}
 
 		/// <summary>Sets a mix duration by animation names.</summary>
 		public void SetMix (string fromName, string toName, float duration) {
 			Animation from = skeletonData.FindAnimation(fromName);
-			if (from == null) throw new ArgumentException("Animation not found: " + fromName);
+			if (from == null) throw new ArgumentException("Animation not found: " + fromName, "fromName");
 			Animation to = skeletonData.FindAnimation(toName);
-			if (to == null) throw new ArgumentException("Animation not found: " + toName);
+			if (to == null) throw new ArgumentException("Animation not found: " + toName, "toName");
 			SetMix(from, to, duration);
 		}
 

+ 0 - 4
spine-csharp/src/Bone.cs

@@ -173,16 +173,12 @@ namespace Spine {
 				d = ld;
 				worldX = x + skeleton.x;
 				worldY = y + skeleton.y;
-//				worldSignX = Math.Sign(scaleX);
-//				worldSignY = Math.Sign(scaleY);
 				return;
 			}
 
 			float pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
 			worldX = pa * x + pb * y + parent.worldX;
 			worldY = pc * x + pd * y + parent.worldY;
-//			worldSignX = parent.worldSignX * Math.Sign(scaleX);
-//			worldSignY = parent.worldSignY * Math.Sign(scaleY);
 
 			switch (data.transformMode) {
 			case TransformMode.Normal: {