Browse Source

[unity] Update Spine Examples

pharan 7 years ago
parent
commit
e4eff73497
100 changed files with 350 additions and 10 deletions
  1. 9 0
      spine-unity/Assets/Spine Examples/Other Examples/Animation Tester.meta
  2. BIN
      spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/Animation Tester.unity
  3. 8 0
      spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/Animation Tester.unity.meta
  4. 117 0
      spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/SpineAnimationTesterTool.cs
  5. 12 0
      spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/SpineAnimationTesterTool.cs.meta
  6. BIN
      spine-unity/Assets/Spine Examples/Other Examples/Mix and Match Equip.unity
  7. 9 0
      spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation.meta
  8. BIN
      spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation/AnimationState with Mecanim.unity
  9. 8 0
      spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation/AnimationState with Mecanim.unity.meta
  10. BIN
      spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation/Hero.controller
  11. 9 0
      spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation/Hero.controller.meta
  12. 62 0
      spine-unity/Assets/Spine Examples/Scripts/AnimationStateMecanimState.cs
  13. 12 0
      spine-unity/Assets/Spine Examples/Scripts/AnimationStateMecanimState.cs.meta
  14. 82 0
      spine-unity/Assets/Spine Examples/Scripts/AnimationStateWithMecanimExample.cs
  15. 12 0
      spine-unity/Assets/Spine Examples/Scripts/AnimationStateWithMecanimExample.cs.meta
  16. 2 2
      spine-unity/Assets/Spine Examples/Scripts/FootSoldierExample.cs
  17. 1 1
      spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/BasicPlatformerController.cs
  18. 2 2
      spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineBeginnerTwo.cs
  19. 2 2
      spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerView.cs
  20. 1 1
      spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyTargetController.cs
  21. 2 2
      spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonAnimationMulti/SkeletonAnimationMulti.cs
  22. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons.meta
  23. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon.meta
  24. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.atlas.txt
  25. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.atlas.txt.meta
  26. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.json
  27. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.json.meta
  28. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.png
  29. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.png.meta
  30. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon2.png
  31. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon2.png.meta
  32. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_Atlas.asset
  33. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_Atlas.asset.meta
  34. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_SkeletonData.asset
  35. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_SkeletonData.asset.meta
  36. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_dragon.mat
  37. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_dragon.mat.meta
  38. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_dragon2.mat
  39. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_dragon2.mat.meta
  40. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/license.txt
  41. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/license.txt.meta
  42. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes.meta
  43. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.atlas.txt
  44. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.atlas.txt.meta
  45. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.json
  46. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.json.meta
  47. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.png
  48. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.png.meta
  49. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_Atlas.asset
  50. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_Atlas.asset.meta
  51. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_Material.mat
  52. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_Material.mat.meta
  53. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_SkeletonData.asset
  54. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_SkeletonData.asset.meta
  55. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier.meta
  56. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment.meta
  57. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment.atlas.txt
  58. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment.atlas.txt.meta
  59. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment.png
  60. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment.png.meta
  61. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment_Atlas.asset
  62. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment_Atlas.asset.meta
  63. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment_Material.mat
  64. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment_Material.mat.meta
  65. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White.atlas.txt
  66. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White.atlas.txt.meta
  67. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White.png
  68. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White.png.meta
  69. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White_Atlas.asset
  70. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White_Atlas.asset.meta
  71. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White_Material.mat
  72. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White_Material.mat.meta
  73. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FootSoldier.json
  74. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FootSoldier.json.meta
  75. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FootSoldier_SkeletonData.asset
  76. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FootSoldier_SkeletonData.asset.meta
  77. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/license.txt
  78. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/license.txt.meta
  79. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge.meta
  80. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.atlas.txt
  81. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.atlas.txt.meta
  82. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.json
  83. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.json.meta
  84. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.png
  85. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.png.meta
  86. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_Atlas.asset
  87. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_Atlas.asset.meta
  88. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_Material.mat
  89. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_Material.mat.meta
  90. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_SkeletonData.asset
  91. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_SkeletonData.asset.meta
  92. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/ReferenceAssets.meta
  93. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/ReferenceAssets/Fill.asset
  94. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/ReferenceAssets/Fill.asset.meta
  95. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins.meta
  96. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/dagger.png
  97. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/dagger.png.meta
  98. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/goblins.atlas.txt
  99. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/goblins.atlas.txt.meta
  100. 0 0
      spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/goblins.json

+ 9 - 0
spine-unity/Assets/Spine Examples/Other Examples/Animation Tester.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 173cd2c662ebd674f994bff2385cfbf6
+folderAsset: yes
+timeCreated: 1529972040
+licenseType: Free
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/Animation Tester.unity


+ 8 - 0
spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/Animation Tester.unity.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b804088948820194cbda76af39c08174
+timeCreated: 1529972058
+licenseType: Free
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 117 - 0
spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/SpineAnimationTesterTool.cs

@@ -0,0 +1,117 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+using Spine;
+using Spine.Unity;
+
+using System.Text;
+
+namespace Spine.Unity.Examples {
+	public class SpineAnimationTesterTool : MonoBehaviour, IHasSkeletonDataAsset, IHasSkeletonComponent {
+
+		public SkeletonAnimation skeletonAnimation;
+		public SkeletonDataAsset SkeletonDataAsset { get { return skeletonAnimation.SkeletonDataAsset; } }
+		public ISkeletonComponent SkeletonComponent { get { return skeletonAnimation; } }
+
+		public bool useOverrideMixDuration;
+		public float overrideMixDuration = 0.2f;
+
+		[System.Serializable]
+		public struct AnimationControl {
+			[SpineAnimation]
+			public string animationName;
+			public bool loop;
+			public KeyCode key;
+
+			[Space]			
+			public bool useCustomMixDuration;
+			public float mixDuration;
+			//public bool useChainToControl;
+			//public int chainToControl;
+		}
+		[System.Serializable]
+		public class ControlledTrack {
+			public List<AnimationControl> controls = new List<AnimationControl>();
+		}
+
+		[Space]
+		public List<ControlledTrack> trackControls = new List<ControlledTrack>();
+
+		[Header("UI")]
+		public UnityEngine.UI.Text boundAnimationsText;
+		public UnityEngine.UI.Text skeletonNameText;
+
+		void OnValidate () {
+			// Fill in the SkeletonData asset name
+			if (skeletonNameText != null) {
+				if (skeletonAnimation != null && skeletonAnimation.skeletonDataAsset != null) {
+					skeletonNameText.text = SkeletonDataAsset.name.Replace("_SkeletonData", "");
+				}
+			}
+
+			// Fill in the control list.
+			if (boundAnimationsText != null) {
+				var boundAnimationsStringBuilder = new StringBuilder();
+				boundAnimationsStringBuilder.AppendLine("Animation Controls:");
+
+				for (int trackIndex = 0; trackIndex < trackControls.Count; trackIndex++) {
+
+					if (trackIndex > 0)
+						boundAnimationsStringBuilder.AppendLine();
+
+					boundAnimationsStringBuilder.AppendFormat("---- Track {0} ---- \n", trackIndex);
+					foreach (var ba in trackControls[trackIndex].controls) {
+						string animationName = ba.animationName;
+						if (string.IsNullOrEmpty(animationName))
+							animationName = "SetEmptyAnimation";
+
+						boundAnimationsStringBuilder.AppendFormat("[{0}]  {1}\n", ba.key.ToString(), animationName);
+					}
+
+				}	
+
+				boundAnimationsText.text = boundAnimationsStringBuilder.ToString();
+
+			}
+				
+		}
+
+		void Start () {
+			if (useOverrideMixDuration) {
+				skeletonAnimation.AnimationState.Data.DefaultMix = overrideMixDuration;
+			}
+		}
+
+		void Update () {
+			var animationState = skeletonAnimation.AnimationState;
+
+			// For each track
+			for (int trackIndex = 0; trackIndex < trackControls.Count; trackIndex++) {
+
+				// For each control in the track
+				foreach (var control in trackControls[trackIndex].controls) {
+
+					// Check each control, and play the appropriate animation.
+					if (Input.GetKeyDown(control.key)) {
+						if (!string.IsNullOrEmpty(control.animationName)) {
+							var trackEntry = animationState.SetAnimation(trackIndex, control.animationName, control.loop);
+							if (control.useCustomMixDuration)
+								trackEntry.MixDuration = control.mixDuration;
+
+						} else {
+							float mix = control.useCustomMixDuration ? control.mixDuration : animationState.Data.DefaultMix;
+							animationState.SetEmptyAnimation(trackIndex, mix);
+						}
+
+						// Don't parse more than one animation per track.
+						break; 
+					}
+				}
+			}
+
+		}
+
+	}
+}
+

+ 12 - 0
spine-unity/Assets/Spine Examples/Other Examples/Animation Tester/SpineAnimationTesterTool.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b99b2d8e59226fa4db070f241259fd98
+timeCreated: 1529972356
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
spine-unity/Assets/Spine Examples/Other Examples/Mix and Match Equip.unity


+ 9 - 0
spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 4766fcfd6167d2e46aad772ce3bc898c
+folderAsset: yes
+timeCreated: 1531292725
+licenseType: Free
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation/AnimationState with Mecanim.unity


+ 8 - 0
spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation/AnimationState with Mecanim.unity.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: afd3c9ec31200bc49b169c22f00b010b
+timeCreated: 1531300871
+licenseType: Free
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation/Hero.controller


+ 9 - 0
spine-unity/Assets/Spine Examples/Other Examples/StateMachine SkeletonAnimation/Hero.controller.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: cec34498f2eb26b488452ec274c54439
+timeCreated: 1531292741
+licenseType: Free
+NativeFormatImporter:
+  mainObjectFileID: 9100000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 62 - 0
spine-unity/Assets/Spine Examples/Scripts/AnimationStateMecanimState.cs

@@ -0,0 +1,62 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+using Spine;
+using Spine.Unity;
+
+public class AnimationStateMecanimState : StateMachineBehaviour {
+
+	#region Inspector
+	public AnimationReferenceAsset animation;
+
+	[System.Serializable]
+	public struct AnimationTransition {
+		public AnimationReferenceAsset from;
+		public AnimationReferenceAsset transition;
+	}
+
+	[UnityEngine.Serialization.FormerlySerializedAs("transitions")]
+	public List<AnimationTransition> fromTransitions = new List<AnimationTransition>();
+	#endregion
+
+	Spine.AnimationState state;
+
+	public void Initialize (Animator animator) {
+		if (state == null) {
+			var animationStateComponent = (animator.GetComponent(typeof(IAnimationStateComponent))) as IAnimationStateComponent;
+			state = animationStateComponent.AnimationState;
+		}
+	}
+
+	override public void OnStateEnter (Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {
+		if (state == null) {
+			Initialize(animator);
+		}
+		
+		float timeScale = stateInfo.speed;
+		var current = state.GetCurrent(layerIndex);
+
+		bool transitionPlayed = false;
+		if (current != null && fromTransitions.Count > 0) {
+			foreach (var t in fromTransitions) {
+				if (t.from.Animation == current.Animation) {
+					var transitionEntry = state.SetAnimation(layerIndex, t.transition.Animation, false);
+					transitionEntry.TimeScale = timeScale;
+					transitionPlayed = true;
+					break;
+				}
+			}
+		}
+
+		TrackEntry trackEntry;
+		if (transitionPlayed) {
+			trackEntry = state.AddAnimation(layerIndex, animation.Animation, stateInfo.loop, 0);
+		} else {
+			trackEntry = state.SetAnimation(layerIndex, animation.Animation, stateInfo.loop);
+		}
+		trackEntry.TimeScale = timeScale;
+
+	}
+
+}

+ 12 - 0
spine-unity/Assets/Spine Examples/Scripts/AnimationStateMecanimState.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 536bdde8dc7bbb641b17da9221d6562f
+timeCreated: 1531293563
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 82 - 0
spine-unity/Assets/Spine Examples/Scripts/AnimationStateWithMecanimExample.cs

@@ -0,0 +1,82 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+using Spine;
+using Spine.Unity;
+
+namespace Spine.Unity.Examples {
+	public class AnimationStateWithMecanimExample : MonoBehaviour {
+
+		SkeletonAnimation skeletonAnimation;
+		Animator logicAnimator;
+		
+		[Header("Controls")]
+		public KeyCode walkButton = KeyCode.LeftShift;
+		public KeyCode jumpButton = KeyCode.Space;
+
+		[Header("Animator Properties")]
+		public string horizontalSpeedProperty = "Speed";
+		public string verticalSpeedProperty = "VerticalSpeed";
+		public string groundedProperty = "Grounded";
+
+		[Header("Fake Physics")]
+		public float jumpDuration = 1.5f;
+		public Vector2 speed;
+		public bool isGrounded;
+
+		void Awake () {
+			skeletonAnimation = GetComponent<SkeletonAnimation>();
+			logicAnimator = GetComponent<Animator>();
+
+			isGrounded = true;
+		}
+
+		void Update () {
+			float x = Input.GetAxisRaw("Horizontal");			
+			if (Input.GetKey(walkButton)) {
+				x *= 0.4f;
+			}
+
+			speed.x = x;
+
+			// Flip skeleton.
+			if (x != 0) {
+				skeletonAnimation.Skeleton.ScaleX = x > 0 ? 1f : -1f;
+			}
+
+			if (Input.GetKeyDown(jumpButton)) {
+				if (isGrounded)
+					StartCoroutine(FakeJump());
+			}
+				
+			logicAnimator.SetFloat(horizontalSpeedProperty, Mathf.Abs(speed.x));
+			logicAnimator.SetFloat(verticalSpeedProperty, speed.y);
+			logicAnimator.SetBool(groundedProperty, isGrounded);
+			
+		}
+
+		IEnumerator FakeJump () {
+			// Rise
+			isGrounded = false;
+			speed.y = 10f;
+			float durationLeft = jumpDuration * 0.5f;
+			while (durationLeft > 0) {
+				durationLeft -= Time.deltaTime;
+				if (!Input.GetKey(jumpButton)) break;
+				yield return null;
+			}
+
+			// Fall
+			speed.y = -10f;
+			float fallDuration = (jumpDuration * 0.5f) - durationLeft;
+			yield return new WaitForSeconds(fallDuration);
+
+			// Land
+			speed.y = 0f;
+			isGrounded = true;
+			yield return null;
+		}
+	}
+
+}

+ 12 - 0
spine-unity/Assets/Spine Examples/Scripts/AnimationStateWithMecanimExample.cs.meta

@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 782062825deffd64ba7e7e9f978788e5
+timeCreated: 1531300740
+licenseType: Free
+MonoImporter:
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/FootSoldierExample.cs

@@ -80,11 +80,11 @@ namespace Spine.Unity.Examples {
 			} else {
 				if (Input.GetKey(rightKey)) {
 					skeletonAnimation.AnimationName = moveAnimation;
-					skeletonAnimation.Skeleton.FlipX = false;
+					skeletonAnimation.Skeleton.ScaleX = 1;
 					transform.Translate(moveSpeed * Time.deltaTime, 0, 0);
 				} else if(Input.GetKey(leftKey)) {
 					skeletonAnimation.AnimationName = moveAnimation;
-					skeletonAnimation.Skeleton.FlipX = true;
+					skeletonAnimation.Skeleton.ScaleX = -1;
 					transform.Translate(-moveSpeed * Time.deltaTime, 0, 0);
 				} else {
 					skeletonAnimation.AnimationName = idleAnimation;

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/BasicPlatformerController.cs

@@ -183,7 +183,7 @@ namespace Spine.Unity.Examples {
 
 			// Face intended direction.
 			if (input.x != 0)
-				skeletonAnimation.Skeleton.FlipX = input.x < 0;
+				skeletonAnimation.Skeleton.ScaleX = Mathf.Sign(input.x);
 
 
 			// Effects

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineBeginnerTwo.cs

@@ -93,11 +93,11 @@ namespace Spine.Unity.Examples {
 				spineAnimationState.AddAnimation(0, idleAnimationName, true, 0);
 				yield return new WaitForSeconds(1f);
 
-				skeleton.FlipX = true;		// skeleton allows you to flip the skeleton.
+				skeleton.ScaleX = -1;		// skeleton allows you to flip the skeleton.
 				spineAnimationState.SetAnimation(0, idleTurnAnimationName, false);
 				spineAnimationState.AddAnimation(0, idleAnimationName, true, 0);
 				yield return new WaitForSeconds(0.5f);
-				skeleton.FlipX = false;
+				skeleton.ScaleX = 1;
 				spineAnimationState.SetAnimation(0, idleTurnAnimationName, false);
 				spineAnimationState.AddAnimation(0, idleAnimationName, true, 0);
 				yield return new WaitForSeconds(0.5f);

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyBeginnerView.cs

@@ -69,7 +69,7 @@ namespace Spine.Unity.Examples {
 			if (skeletonAnimation == null) return;
 			if (model == null) return;
 
-			if (skeletonAnimation.skeleton.FlipX != model.facingLeft) {	// Detect changes in model.facingLeft
+			if ((skeletonAnimation.skeleton.ScaleX < 0) != model.facingLeft) {	// Detect changes in model.facingLeft
 				Turn(model.facingLeft);
 			}
 
@@ -134,7 +134,7 @@ namespace Spine.Unity.Examples {
 		}
 
 		public void Turn (bool facingLeft) {
-			skeletonAnimation.Skeleton.FlipX = facingLeft;
+			skeletonAnimation.Skeleton.ScaleX = facingLeft ? -1f : 1f;
 			// Maybe play a transient turning animation too, then call ChangeStableAnimation.
 		}
 		#endregion

+ 1 - 1
spine-unity/Assets/Spine Examples/Scripts/Getting Started Scripts/SpineboyTargetController.cs

@@ -23,7 +23,7 @@ namespace Spine.Unity.Examples {
 			var mousePosition = Input.mousePosition;
 			var worldMousePosition = camera.ScreenToWorldPoint(mousePosition);
 			var skeletonSpacePoint = skeletonAnimation.transform.InverseTransformPoint(worldMousePosition);
-			if (skeletonAnimation.Skeleton.FlipX) skeletonSpacePoint.x *= -1;
+			//if (skeletonAnimation.Skeleton.FlipX) skeletonSpacePoint.x *= -1;
 			bone.SetPosition(skeletonSpacePoint);
 		}
 	}

+ 2 - 2
spine-unity/Assets/Spine Examples/Scripts/Sample Components/SkeletonAnimationMulti/SkeletonAnimationMulti.cs

@@ -69,8 +69,8 @@ namespace Spine.Unity {
 				sa.initialFlipX = this.initialFlipX;
 				sa.initialFlipY = this.initialFlipY;
 				var skeleton = sa.skeleton;
-				skeleton.FlipX = this.initialFlipX;
-				skeleton.FlipY = this.initialFlipY;
+				skeleton.ScaleX = this.initialFlipX ? 1 : -1;
+				skeleton.ScaleY = this.initialFlipY ? 1 : -1;
 
 				sa.Initialize(false);
 				skeletonAnimations.Add(sa);

+ 0 - 0
spine-unity/Assets/Spine Examples/Spine.meta → spine-unity/Assets/Spine Examples/Spine Skeletons.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon.atlas.txt → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.atlas.txt


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon.atlas.txt.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.atlas.txt.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon.json → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.json


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon.json.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.json.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon.png → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.png


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon.png.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon.png.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon2.png → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon2.png


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon2.png.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon2.png.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon_Atlas.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_Atlas.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon_Atlas.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_Atlas.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon_SkeletonData.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_SkeletonData.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon_SkeletonData.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_SkeletonData.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon_dragon.mat → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_dragon.mat


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon_dragon.mat.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_dragon.mat.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon_dragon2.mat → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_dragon2.mat


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/dragon_dragon2.mat.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/dragon_dragon2.mat.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/license.txt → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/license.txt


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Dragon/license.txt.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Dragon/license.txt.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes.atlas.txt → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.atlas.txt


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes.atlas.txt.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.atlas.txt.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes.json → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.json


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes.json.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.json.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes.png → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.png


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes.png.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes.png.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes_Atlas.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_Atlas.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes_Atlas.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_Atlas.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes_Material.mat → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_Material.mat


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes_Material.mat.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_Material.mat.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes_SkeletonData.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_SkeletonData.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Eyes/eyes_SkeletonData.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Eyes/eyes_SkeletonData.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/Equipment.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/Equipment/Equipment.atlas.txt → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment.atlas.txt


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/Equipment/Equipment.atlas.txt.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment.atlas.txt.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/Equipment/Equipment.png → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment.png


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/Equipment/Equipment.png.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment.png.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/Equipment/Equipment_Atlas.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment_Atlas.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/Equipment/Equipment_Atlas.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment_Atlas.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/Equipment/Equipment_Material.mat → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment_Material.mat


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/Equipment/Equipment_Material.mat.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/Equipment/Equipment_Material.mat.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FS_White.atlas.txt → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White.atlas.txt


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FS_White.atlas.txt.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White.atlas.txt.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FS_White.png → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White.png


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FS_White.png.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White.png.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FS_White_Atlas.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White_Atlas.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FS_White_Atlas.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White_Atlas.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FS_White_Material.mat → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White_Material.mat


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FS_White_Material.mat.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FS_White_Material.mat.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FootSoldier.json → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FootSoldier.json


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FootSoldier.json.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FootSoldier.json.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FootSoldier_SkeletonData.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FootSoldier_SkeletonData.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/FootSoldier_SkeletonData.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/FootSoldier_SkeletonData.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/license.txt → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/license.txt


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/FootSoldier/license.txt.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/FootSoldier/license.txt.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge.atlas.txt → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.atlas.txt


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge.atlas.txt.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.atlas.txt.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge.json → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.json


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge.json.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.json.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge.png → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.png


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge.png.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge.png.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge_Atlas.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_Atlas.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge_Atlas.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_Atlas.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge_Material.mat → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_Material.mat


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge_Material.mat.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_Material.mat.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge_SkeletonData.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_SkeletonData.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/Gauge_SkeletonData.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/Gauge_SkeletonData.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/ReferenceAssets.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/ReferenceAssets.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/ReferenceAssets/Fill.asset → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/ReferenceAssets/Fill.asset


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Gauge/ReferenceAssets/Fill.asset.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Gauge/ReferenceAssets/Fill.asset.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Goblins.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Goblins/dagger.png → spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/dagger.png


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Goblins/dagger.png.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/dagger.png.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Goblins/goblins.atlas.txt → spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/goblins.atlas.txt


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Goblins/goblins.atlas.txt.meta → spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/goblins.atlas.txt.meta


+ 0 - 0
spine-unity/Assets/Spine Examples/Spine/Goblins/goblins.json → spine-unity/Assets/Spine Examples/Spine Skeletons/Goblins/goblins.json


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