mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Fixed events on first frame not being fired for looping animations when their duration is 1s.
This commit is contained in:
parent
2650e2679d
commit
b6f7e50ff7
@ -71,7 +71,7 @@ public class Animation {
|
||||
|
||||
if (loop && duration != 0) {
|
||||
time %= duration;
|
||||
lastTime %= duration;
|
||||
if (lastTime > 0) lastTime %= duration;
|
||||
}
|
||||
|
||||
Array<Timeline> timelines = this.timelines;
|
||||
@ -88,7 +88,7 @@ public class Animation {
|
||||
|
||||
if (loop && duration != 0) {
|
||||
time %= duration;
|
||||
lastTime %= duration;
|
||||
if (lastTime > 0) lastTime %= duration;
|
||||
}
|
||||
|
||||
Array<Timeline> timelines = this.timelines;
|
||||
@ -516,8 +516,8 @@ public class Animation {
|
||||
if (frames[frameIndex] < lastTime) return;
|
||||
|
||||
String attachmentName = attachmentNames[frameIndex];
|
||||
skeleton.slots.get(slotIndex).setAttachment(
|
||||
attachmentName == null ? null : skeleton.getAttachment(slotIndex, attachmentName));
|
||||
skeleton.slots.get(slotIndex)
|
||||
.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slotIndex, attachmentName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user