瀏覽代碼

[unity] Formatting (#889)

John 8 年之前
父節點
當前提交
06c2482dcd
共有 1 個文件被更改,包括 10 次插入12 次删除
  1. 10 12
      spine-unity/Assets/spine-unity/SkeletonAnimator.cs

+ 10 - 12
spine-unity/Assets/spine-unity/SkeletonAnimator.cs

@@ -88,7 +88,7 @@ namespace Spine.Unity {
 
 
 			if (layerMixModes.Length < animator.layerCount)
 			if (layerMixModes.Length < animator.layerCount)
 				System.Array.Resize<MixMode>(ref layerMixModes, animator.layerCount);
 				System.Array.Resize<MixMode>(ref layerMixModes, animator.layerCount);
-			
+
 			//skeleton.Update(Time.deltaTime); // Doesn't actually do anything, currently. (Spine 3.5).
 			//skeleton.Update(Time.deltaTime); // Doesn't actually do anything, currently. (Spine 3.5).
 
 
 			// Clear Previous
 			// Clear Previous
@@ -132,10 +132,10 @@ namespace Spine.Unity {
 				bool hasNext = nextStateInfo.fullPathHash != 0;
 				bool hasNext = nextStateInfo.fullPathHash != 0;
 				AnimatorClipInfo[] clipInfo = animator.GetCurrentAnimatorClipInfo(layer);
 				AnimatorClipInfo[] clipInfo = animator.GetCurrentAnimatorClipInfo(layer);
 				AnimatorClipInfo[] nextClipInfo = animator.GetNextAnimatorClipInfo(layer);
 				AnimatorClipInfo[] nextClipInfo = animator.GetNextAnimatorClipInfo(layer);
-//				UNITY 4
-//				bool hasNext = nextStateInfo.nameHash != 0;
-//				var clipInfo = animator.GetCurrentAnimationClipState(i);
-//				var nextClipInfo = animator.GetNextAnimationClipState(i);
+				//UNITY 4
+				//bool hasNext = nextStateInfo.nameHash != 0;
+				//var clipInfo = animator.GetCurrentAnimationClipState(i);
+				//var nextClipInfo = animator.GetNextAnimationClipState(i);
 
 
 				MixMode mode = layerMixModes[layer];
 				MixMode mode = layerMixModes[layer];
 				if (mode == MixMode.AlwaysMix) {
 				if (mode == MixMode.AlwaysMix) {
@@ -201,19 +201,17 @@ namespace Spine.Unity {
 		}
 		}
 
 
 		static float AnimationTime (float normalizedTime, float clipLength, bool loop, bool reversed) {
 		static float AnimationTime (float normalizedTime, float clipLength, bool loop, bool reversed) {
-			if(reversed){
-				normalizedTime = (1-normalizedTime+(int)normalizedTime) + (int)normalizedTime;
-			}
+			if (reversed)
+				normalizedTime = (1-normalizedTime + (int)normalizedTime) + (int)normalizedTime;
 			float time = normalizedTime * clipLength;
 			float time = normalizedTime * clipLength;
 			if (loop) return time;
 			if (loop) return time;
 			const float EndSnapEpsilon = 1f/30f; // Workaround for end-duration keys not being applied.
 			const float EndSnapEpsilon = 1f/30f; // Workaround for end-duration keys not being applied.
 			return (clipLength - time < EndSnapEpsilon) ? clipLength : time; // return a time snapped to clipLength;
 			return (clipLength - time < EndSnapEpsilon) ? clipLength : time; // return a time snapped to clipLength;
 		}
 		}
 
 
-		static float AnimationTime(float normalizedTime, float clipLength, bool reversed) {
-			if(reversed){
-				normalizedTime = (1-normalizedTime+(int)normalizedTime) + (int)normalizedTime;
-			}
+		static float AnimationTime (float normalizedTime, float clipLength, bool reversed) {
+			if (reversed)
+				normalizedTime = (1-normalizedTime + (int)normalizedTime) + (int)normalizedTime;
 
 
 			return normalizedTime * clipLength;
 			return normalizedTime * clipLength;
 		}
 		}