[unity] Adjusted example scripts to renamed MixAttachmentThreshold changes (see commit 1c16ea33).

This commit is contained in:
Harald Csaszar 2023-11-22 16:51:36 +01:00
parent 91cf9c36d7
commit 5d9b361b1c
4 changed files with 10 additions and 10 deletions

View File

@ -144,10 +144,10 @@ namespace Spine.Unity.Examples {
trackEntry.MixDuration = control.mixDuration; trackEntry.MixDuration = control.mixDuration;
if (useOverrideAttachmentThreshold) if (useOverrideAttachmentThreshold)
trackEntry.AttachmentThreshold = attachmentThreshold; trackEntry.MixAttachmentThreshold = attachmentThreshold;
if (useOverrideDrawOrderThreshold) if (useOverrideDrawOrderThreshold)
trackEntry.DrawOrderThreshold = drawOrderThreshold; trackEntry.MixDrawOrderThreshold = drawOrderThreshold;
} }
// Don't parse more than one animation per track. // Don't parse more than one animation per track.

View File

@ -124,13 +124,13 @@ namespace Spine.Unity.Examples {
public void PlayShoot () { public void PlayShoot () {
// Play the shoot animation on track 1. // Play the shoot animation on track 1.
TrackEntry shootTrack = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false); TrackEntry shootTrack = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false);
shootTrack.AttachmentThreshold = 1f; shootTrack.MixAttachmentThreshold = 1f;
shootTrack.MixDuration = 0f; shootTrack.MixDuration = 0f;
skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f); skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f);
// Play the aim animation on track 2 to aim at the mouse target. // Play the aim animation on track 2 to aim at the mouse target.
TrackEntry aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, false); TrackEntry aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, false);
aimTrack.AttachmentThreshold = 1f; aimTrack.MixAttachmentThreshold = 1f;
aimTrack.MixDuration = 0f; aimTrack.MixDuration = 0f;
skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f); skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f);
@ -143,7 +143,7 @@ namespace Spine.Unity.Examples {
public void StartPlayingAim () { public void StartPlayingAim () {
// Play the aim animation on track 2 to aim at the mouse target. // Play the aim animation on track 2 to aim at the mouse target.
TrackEntry aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, true); TrackEntry aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, true);
aimTrack.AttachmentThreshold = 1f; aimTrack.MixAttachmentThreshold = 1f;
aimTrack.MixDuration = 0f; aimTrack.MixDuration = 0f;
} }

View File

@ -124,13 +124,13 @@ namespace Spine.Unity.Examples {
public void PlayShoot () { public void PlayShoot () {
// Play the shoot animation on track 1. // Play the shoot animation on track 1.
TrackEntry shootTrack = skeletonGraphic.AnimationState.SetAnimation(1, shoot, false); TrackEntry shootTrack = skeletonGraphic.AnimationState.SetAnimation(1, shoot, false);
shootTrack.AttachmentThreshold = 1f; shootTrack.MixAttachmentThreshold = 1f;
shootTrack.MixDuration = 0f; shootTrack.MixDuration = 0f;
skeletonGraphic.AnimationState.AddEmptyAnimation(1, 0.5f, 0.1f); skeletonGraphic.AnimationState.AddEmptyAnimation(1, 0.5f, 0.1f);
// Play the aim animation on track 2 to aim at the mouse target. // Play the aim animation on track 2 to aim at the mouse target.
TrackEntry aimTrack = skeletonGraphic.AnimationState.SetAnimation(2, aim, false); TrackEntry aimTrack = skeletonGraphic.AnimationState.SetAnimation(2, aim, false);
aimTrack.AttachmentThreshold = 1f; aimTrack.MixAttachmentThreshold = 1f;
aimTrack.MixDuration = 0f; aimTrack.MixDuration = 0f;
skeletonGraphic.AnimationState.AddEmptyAnimation(2, 0.5f, 0.1f); skeletonGraphic.AnimationState.AddEmptyAnimation(2, 0.5f, 0.1f);
@ -143,7 +143,7 @@ namespace Spine.Unity.Examples {
public void StartPlayingAim () { public void StartPlayingAim () {
// Play the aim animation on track 2 to aim at the mouse target. // Play the aim animation on track 2 to aim at the mouse target.
TrackEntry aimTrack = skeletonGraphic.AnimationState.SetAnimation(2, aim, true); TrackEntry aimTrack = skeletonGraphic.AnimationState.SetAnimation(2, aim, true);
aimTrack.AttachmentThreshold = 1f; aimTrack.MixAttachmentThreshold = 1f;
aimTrack.MixDuration = 0f; aimTrack.MixDuration = 0f;
} }

View File

@ -218,14 +218,14 @@ namespace Spine.Unity.Playables {
float clipSpeed = (float)clipPlayable.GetSpeed(); float clipSpeed = (float)clipPlayable.GetSpeed();
trackEntry.EventThreshold = clipData.eventThreshold; trackEntry.EventThreshold = clipData.eventThreshold;
trackEntry.DrawOrderThreshold = clipData.drawOrderThreshold; trackEntry.MixDrawOrderThreshold = clipData.drawOrderThreshold;
#if SPEED_INCLUDED_IN_CLIP_TIME #if SPEED_INCLUDED_IN_CLIP_TIME
trackEntry.TrackTime = (float)clipPlayable.GetTime(); trackEntry.TrackTime = (float)clipPlayable.GetTime();
#else #else
trackEntry.TrackTime = (float)clipPlayable.GetTime() * rootPlayableSpeed * clipSpeed; trackEntry.TrackTime = (float)clipPlayable.GetTime() * rootPlayableSpeed * clipSpeed;
#endif #endif
trackEntry.TimeScale = clipSpeed * rootPlayableSpeed; trackEntry.TimeScale = clipSpeed * rootPlayableSpeed;
trackEntry.AttachmentThreshold = clipData.attachmentThreshold; trackEntry.MixAttachmentThreshold = clipData.attachmentThreshold;
trackEntry.HoldPrevious = clipData.holdPrevious; trackEntry.HoldPrevious = clipData.holdPrevious;
trackEntry.Alpha = clipData.alpha; trackEntry.Alpha = clipData.alpha;