mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 00:06:42 +08:00
[unity] Adjusted example scripts to renamed MixAttachmentThreshold changes (see commit 1c16ea33).
This commit is contained in:
parent
91cf9c36d7
commit
5d9b361b1c
@ -144,10 +144,10 @@ namespace Spine.Unity.Examples {
|
||||
trackEntry.MixDuration = control.mixDuration;
|
||||
|
||||
if (useOverrideAttachmentThreshold)
|
||||
trackEntry.AttachmentThreshold = attachmentThreshold;
|
||||
trackEntry.MixAttachmentThreshold = attachmentThreshold;
|
||||
|
||||
if (useOverrideDrawOrderThreshold)
|
||||
trackEntry.DrawOrderThreshold = drawOrderThreshold;
|
||||
trackEntry.MixDrawOrderThreshold = drawOrderThreshold;
|
||||
}
|
||||
|
||||
// Don't parse more than one animation per track.
|
||||
|
||||
@ -124,13 +124,13 @@ namespace Spine.Unity.Examples {
|
||||
public void PlayShoot () {
|
||||
// Play the shoot animation on track 1.
|
||||
TrackEntry shootTrack = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false);
|
||||
shootTrack.AttachmentThreshold = 1f;
|
||||
shootTrack.MixAttachmentThreshold = 1f;
|
||||
shootTrack.MixDuration = 0f;
|
||||
skeletonAnimation.state.AddEmptyAnimation(1, 0.5f, 0.1f);
|
||||
|
||||
// Play the aim animation on track 2 to aim at the mouse target.
|
||||
TrackEntry aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, false);
|
||||
aimTrack.AttachmentThreshold = 1f;
|
||||
aimTrack.MixAttachmentThreshold = 1f;
|
||||
aimTrack.MixDuration = 0f;
|
||||
skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f);
|
||||
|
||||
@ -143,7 +143,7 @@ namespace Spine.Unity.Examples {
|
||||
public void StartPlayingAim () {
|
||||
// Play the aim animation on track 2 to aim at the mouse target.
|
||||
TrackEntry aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, true);
|
||||
aimTrack.AttachmentThreshold = 1f;
|
||||
aimTrack.MixAttachmentThreshold = 1f;
|
||||
aimTrack.MixDuration = 0f;
|
||||
}
|
||||
|
||||
|
||||
@ -124,13 +124,13 @@ namespace Spine.Unity.Examples {
|
||||
public void PlayShoot () {
|
||||
// Play the shoot animation on track 1.
|
||||
TrackEntry shootTrack = skeletonGraphic.AnimationState.SetAnimation(1, shoot, false);
|
||||
shootTrack.AttachmentThreshold = 1f;
|
||||
shootTrack.MixAttachmentThreshold = 1f;
|
||||
shootTrack.MixDuration = 0f;
|
||||
skeletonGraphic.AnimationState.AddEmptyAnimation(1, 0.5f, 0.1f);
|
||||
|
||||
// Play the aim animation on track 2 to aim at the mouse target.
|
||||
TrackEntry aimTrack = skeletonGraphic.AnimationState.SetAnimation(2, aim, false);
|
||||
aimTrack.AttachmentThreshold = 1f;
|
||||
aimTrack.MixAttachmentThreshold = 1f;
|
||||
aimTrack.MixDuration = 0f;
|
||||
skeletonGraphic.AnimationState.AddEmptyAnimation(2, 0.5f, 0.1f);
|
||||
|
||||
@ -143,7 +143,7 @@ namespace Spine.Unity.Examples {
|
||||
public void StartPlayingAim () {
|
||||
// Play the aim animation on track 2 to aim at the mouse target.
|
||||
TrackEntry aimTrack = skeletonGraphic.AnimationState.SetAnimation(2, aim, true);
|
||||
aimTrack.AttachmentThreshold = 1f;
|
||||
aimTrack.MixAttachmentThreshold = 1f;
|
||||
aimTrack.MixDuration = 0f;
|
||||
}
|
||||
|
||||
|
||||
@ -218,14 +218,14 @@ namespace Spine.Unity.Playables {
|
||||
|
||||
float clipSpeed = (float)clipPlayable.GetSpeed();
|
||||
trackEntry.EventThreshold = clipData.eventThreshold;
|
||||
trackEntry.DrawOrderThreshold = clipData.drawOrderThreshold;
|
||||
trackEntry.MixDrawOrderThreshold = clipData.drawOrderThreshold;
|
||||
#if SPEED_INCLUDED_IN_CLIP_TIME
|
||||
trackEntry.TrackTime = (float)clipPlayable.GetTime();
|
||||
#else
|
||||
trackEntry.TrackTime = (float)clipPlayable.GetTime() * rootPlayableSpeed * clipSpeed;
|
||||
#endif
|
||||
trackEntry.TimeScale = clipSpeed * rootPlayableSpeed;
|
||||
trackEntry.AttachmentThreshold = clipData.attachmentThreshold;
|
||||
trackEntry.MixAttachmentThreshold = clipData.attachmentThreshold;
|
||||
trackEntry.HoldPrevious = clipData.holdPrevious;
|
||||
trackEntry.Alpha = clipData.alpha;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user