mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Cleanup: Removed commented-out code from Timeline component code.
This commit is contained in:
parent
09b8d8c3aa
commit
9583cb9183
@ -42,7 +42,6 @@ namespace Spine.Unity.Playables {
|
|||||||
public class SkeletonAnimationPlayableHandle : SpinePlayableHandleBase {
|
public class SkeletonAnimationPlayableHandle : SpinePlayableHandleBase {
|
||||||
#region Inspector
|
#region Inspector
|
||||||
public SkeletonAnimation skeletonAnimation;
|
public SkeletonAnimation skeletonAnimation;
|
||||||
//public float fadeOutDuration = 0.5f;
|
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
void OnValidate () {
|
void OnValidate () {
|
||||||
@ -53,8 +52,6 @@ namespace Spine.Unity.Playables {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//readonly HashSet<int> frameAppliedProperties = new HashSet<int>();
|
|
||||||
|
|
||||||
public override Skeleton Skeleton { get { return skeletonAnimation.Skeleton; } }
|
public override Skeleton Skeleton { get { return skeletonAnimation.Skeleton; } }
|
||||||
public override SkeletonData SkeletonData { get { return skeletonAnimation.Skeleton.data; } }
|
public override SkeletonData SkeletonData { get { return skeletonAnimation.Skeleton.data; } }
|
||||||
|
|
||||||
@ -62,52 +59,7 @@ namespace Spine.Unity.Playables {
|
|||||||
void Awake () {
|
void Awake () {
|
||||||
if (skeletonAnimation == null)
|
if (skeletonAnimation == null)
|
||||||
skeletonAnimation = GetComponent<SkeletonAnimation>();
|
skeletonAnimation = GetComponent<SkeletonAnimation>();
|
||||||
|
|
||||||
//frameAppliedProperties.Clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Skeleton skeleton;
|
|
||||||
//int frameTrackCount = 0;
|
|
||||||
//int frameCurrentInputs = 0;
|
|
||||||
//bool firstCleared = false;
|
|
||||||
//int lastApplyFrame = 0;
|
|
||||||
//public override void ProcessFrame (Playable playable, FrameData info, SpineAnimationMixerBehaviour mixer) {
|
|
||||||
// if (skeletonAnimation == null) return;
|
|
||||||
// if (skeleton == null) skeleton = skeletonAnimation.Skeleton;
|
|
||||||
|
|
||||||
// // New frame.
|
|
||||||
// if (lastApplyFrame != Time.frameCount) {
|
|
||||||
// if (frameTrackCount > 0)
|
|
||||||
// frameAppliedProperties.Clear();
|
|
||||||
|
|
||||||
// frameCurrentInputs = 0;
|
|
||||||
// frameTrackCount = 0;
|
|
||||||
// }
|
|
||||||
// lastApplyFrame = Time.frameCount;
|
|
||||||
|
|
||||||
// int currentInputs = mixer.ApplyPlayableFrame(playable, skeleton, frameAppliedProperties, frameTrackCount);
|
|
||||||
// frameCurrentInputs += currentInputs;
|
|
||||||
|
|
||||||
// // EXPERIMENTAL: Handle overriding SkeletonAnimation.AnimationState.
|
|
||||||
// if (frameCurrentInputs > 0) {
|
|
||||||
// var state = skeletonAnimation.AnimationState;
|
|
||||||
|
|
||||||
// if (!firstCleared) {
|
|
||||||
// firstCleared = true;
|
|
||||||
// for (int i = 0; i < 4; i++) {
|
|
||||||
// if (state.GetCurrent(i) != null) state.SetEmptyAnimation(i, fadeOutDuration);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Update again whenever an animation is playing in the AnimationState. Quite wasteful.
|
|
||||||
// //if (state.GetCurrent(0) != null) {
|
|
||||||
// skeleton.UpdateWorldTransform();
|
|
||||||
// //}
|
|
||||||
// }
|
|
||||||
|
|
||||||
// frameTrackCount++;
|
|
||||||
//}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,10 +45,6 @@ namespace Spine.Unity.Playables {
|
|||||||
|
|
||||||
public abstract Skeleton Skeleton { get; }
|
public abstract Skeleton Skeleton { get; }
|
||||||
|
|
||||||
/// <summary>MixerBehaviour ProcessFrame method handler.</summary>
|
|
||||||
/// <returns>Returns true if a playable was applied previously</returns>
|
|
||||||
//public abstract void ProcessFrame (Playable playable, FrameData info, SpineAnimationMixerBehaviour mixer);
|
|
||||||
|
|
||||||
/// <summary>Subscribe to this to handle user events played by the Unity playable</summary>
|
/// <summary>Subscribe to this to handle user events played by the Unity playable</summary>
|
||||||
public event SpineEventDelegate AnimationEvents;
|
public event SpineEventDelegate AnimationEvents;
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ namespace Spine.Unity.Playables {
|
|||||||
|
|
||||||
public override Playable CreatePlayable (PlayableGraph graph, GameObject owner) {
|
public override Playable CreatePlayable (PlayableGraph graph, GameObject owner) {
|
||||||
var playable = ScriptPlayable<SpineAnimationStateBehaviour>.Create(graph, template);
|
var playable = ScriptPlayable<SpineAnimationStateBehaviour>.Create(graph, template);
|
||||||
playable.GetBehaviour(); //SpineAnimationStateBehaviour clone = playable.GetBehaviour();
|
playable.GetBehaviour();
|
||||||
return playable;
|
return playable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user