mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[csharp] Fixed AddAnimation.
Port of a961b41a9c.
See: https://github.com/EsotericSoftware/spine-runtimes/issues/1092
This commit is contained in:
parent
a961b41a9c
commit
c956bb4bc9
@ -528,13 +528,13 @@ namespace Spine {
|
|||||||
float duration = last.animationEnd - last.animationStart;
|
float duration = last.animationEnd - last.animationStart;
|
||||||
if (duration != 0) {
|
if (duration != 0) {
|
||||||
if (last.loop) {
|
if (last.loop) {
|
||||||
delay += duration * (1 + (int)(last.trackTime / duration));
|
delay += duration * (1 + (int)(last.trackTime / duration)); // Completion of next loop.
|
||||||
} else {
|
} else {
|
||||||
delay += duration;
|
delay += Math.Max(duration, last.trackTime); // After duration, else next update.
|
||||||
}
|
}
|
||||||
delay -= data.GetMix(last.animation, animation);
|
delay -= data.GetMix(last.animation, animation);
|
||||||
} else
|
} else
|
||||||
delay = 0;
|
delay = last.trackTime; // Next update.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user