mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
abc75a50e8
@ -136,7 +136,7 @@ namespace Spine {
|
|||||||
from.trackTime += delta * from.timeScale;
|
from.trackTime += delta * from.timeScale;
|
||||||
entry.mixTime += delta * entry.timeScale;
|
entry.mixTime += delta * entry.timeScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the
|
/// Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the
|
||||||
@ -242,6 +242,9 @@ namespace Spine {
|
|||||||
|
|
||||||
static private void ApplyRotateTimeline (RotateTimeline rotateTimeline, Skeleton skeleton, float time, float alpha, bool setupPose,
|
static private void ApplyRotateTimeline (RotateTimeline rotateTimeline, Skeleton skeleton, float time, float alpha, bool setupPose,
|
||||||
float[] timelinesRotation, int i, bool firstFrame) {
|
float[] timelinesRotation, int i, bool firstFrame) {
|
||||||
|
|
||||||
|
if (firstFrame) timelinesRotation[i] = 0;
|
||||||
|
|
||||||
if (alpha == 1) {
|
if (alpha == 1) {
|
||||||
rotateTimeline.Apply(skeleton, 0, time, null, 1, setupPose, false);
|
rotateTimeline.Apply(skeleton, 0, time, null, 1, setupPose, false);
|
||||||
return;
|
return;
|
||||||
@ -275,11 +278,7 @@ namespace Spine {
|
|||||||
float r1 = setupPose ? bone.data.rotation : bone.rotation;
|
float r1 = setupPose ? bone.data.rotation : bone.rotation;
|
||||||
float total, diff = r2 - r1;
|
float total, diff = r2 - r1;
|
||||||
if (diff == 0) {
|
if (diff == 0) {
|
||||||
if (firstFrame) {
|
total = timelinesRotation[i];
|
||||||
timelinesRotation[i] = 0;
|
|
||||||
total = 0;
|
|
||||||
} else
|
|
||||||
total = timelinesRotation[i];
|
|
||||||
} else {
|
} else {
|
||||||
diff -= (16384 - (int)(16384.499999999996 - diff / 360)) * 360;
|
diff -= (16384 - (int)(16384.499999999996 - diff / 360)) * 360;
|
||||||
float lastTotal, lastDiff;
|
float lastTotal, lastDiff;
|
||||||
@ -505,7 +504,7 @@ namespace Spine {
|
|||||||
entry.trackEnd = mixDuration;
|
entry.trackEnd = mixDuration;
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration.</summary>
|
/// Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration.</summary>
|
||||||
public void SetEmptyAnimations (float mixDuration) {
|
public void SetEmptyAnimations (float mixDuration) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user