[unity] Updated examples to use trackEntry.SetMixDuration(mixDuration, delay) instead of mixDuration.

This commit is contained in:
Harald Csaszar 2023-11-22 17:23:54 +01:00
parent a5f7d68d12
commit 549f19383d
7 changed files with 11 additions and 11 deletions

View File

@ -141,7 +141,7 @@ namespace Spine.Unity.Examples {
if (trackEntry != null) {
if (control.useCustomMixDuration)
trackEntry.MixDuration = control.mixDuration;
trackEntry.SetMixDuration(control.mixDuration, 0f); // use SetMixDuration(mixDuration, delay) to update delay correctly
if (useOverrideAttachmentThreshold)
trackEntry.MixAttachmentThreshold = attachmentThreshold;

View File

@ -125,13 +125,13 @@ namespace Spine.Unity.Examples {
// Play the shoot animation on track 1.
TrackEntry shootTrack = skeletonAnimation.AnimationState.SetAnimation(1, shoot, false);
shootTrack.MixAttachmentThreshold = 1f;
shootTrack.MixDuration = 0f;
shootTrack.SetMixDuration(0f, 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.MixAttachmentThreshold = 1f;
aimTrack.MixDuration = 0f;
aimTrack.SetMixDuration(0f, 0f);
skeletonAnimation.state.AddEmptyAnimation(2, 0.5f, 0.1f);
gunSource.pitch = GetRandomPitch(gunsoundPitchOffset);
@ -144,7 +144,7 @@ namespace Spine.Unity.Examples {
// Play the aim animation on track 2 to aim at the mouse target.
TrackEntry aimTrack = skeletonAnimation.AnimationState.SetAnimation(2, aim, true);
aimTrack.MixAttachmentThreshold = 1f;
aimTrack.MixDuration = 0f;
aimTrack.SetMixDuration(0f, 0f); // use SetMixDuration(mixDuration, delay) to update delay correctly
}
public void StopPlayingAim () {

View File

@ -125,13 +125,13 @@ namespace Spine.Unity.Examples {
// Play the shoot animation on track 1.
TrackEntry shootTrack = skeletonGraphic.AnimationState.SetAnimation(1, shoot, false);
shootTrack.MixAttachmentThreshold = 1f;
shootTrack.MixDuration = 0f;
shootTrack.SetMixDuration(0f, 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.MixAttachmentThreshold = 1f;
aimTrack.MixDuration = 0f;
aimTrack.SetMixDuration(0f, 0f);
skeletonGraphic.AnimationState.AddEmptyAnimation(2, 0.5f, 0.1f);
gunSource.pitch = GetRandomPitch(gunsoundPitchOffset);
@ -144,7 +144,7 @@ namespace Spine.Unity.Examples {
// Play the aim animation on track 2 to aim at the mouse target.
TrackEntry aimTrack = skeletonGraphic.AnimationState.SetAnimation(2, aim, true);
aimTrack.MixAttachmentThreshold = 1f;
aimTrack.MixDuration = 0f;
aimTrack.SetMixDuration(0f, 0f); // use SetMixDuration(mixDuration, delay) to update delay correctly
}
public void StopPlayingAim () {

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-unity-examples",
"displayName": "spine-unity Runtime Examples",
"description": "This plugin provides example scenes and scripts for the spine-unity runtime.",
"version": "4.2.23",
"version": "4.2.24",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-unity",
"displayName": "spine-unity Runtime",
"description": "This plugin provides the spine-unity runtime core.",
"version": "4.2.32",
"version": "4.2.33",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",

View File

@ -230,7 +230,7 @@ namespace Spine.Unity.Playables {
trackEntry.Alpha = clipData.alpha;
if (clipData.customDuration)
trackEntry.MixDuration = customMixDuration / rootPlayableSpeed;
trackEntry.SetMixDuration(customMixDuration / rootPlayableSpeed, 0f);
timelineStartedTrackEntry = trackEntry;
}

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.timeline",
"displayName": "Spine Timeline Extensions",
"description": "This plugin provides integration of spine-unity for the Unity Timeline.\n\nPrerequisites:\nIt requires a working installation of the spine-unity and spine-csharp runtimes as UPM packages (not as spine-unity unitypackage), version 4.2.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
"version": "4.2.14",
"version": "4.2.15",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",