mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[csharp] Fixes completion event firing for 0 duration animations. See #1112.
This commit is contained in:
parent
1833f4211a
commit
0ad0fc4de8
@ -366,10 +366,12 @@ namespace Spine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Queue complete if completed a loop iteration or the animation.
|
// Queue complete if completed a loop iteration or the animation.
|
||||||
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
|
var complete = false;
|
||||||
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
|
if (entry.loop)
|
||||||
queue.Complete(entry);
|
complete = duration == 0 || (trackLastWrapped > entry.trackTime % duration);
|
||||||
}
|
else
|
||||||
|
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
|
||||||
|
if (complete) queue.Complete(entry);
|
||||||
|
|
||||||
// Queue events after complete.
|
// Queue events after complete.
|
||||||
for (; i < n; i++) {
|
for (; i < n; i++) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user