mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16: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.
|
||||
if (entry.loop ? (trackLastWrapped > entry.trackTime % duration)
|
||||
: (animationTime >= animationEnd && entry.animationLast < animationEnd)) {
|
||||
queue.Complete(entry);
|
||||
}
|
||||
var complete = false;
|
||||
if (entry.loop)
|
||||
complete = duration == 0 || (trackLastWrapped > entry.trackTime % duration);
|
||||
else
|
||||
complete = animationTime >= animationEnd && entry.animationLast < animationEnd;
|
||||
if (complete) queue.Complete(entry);
|
||||
|
||||
// Queue events after complete.
|
||||
for (; i < n; i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user