mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 06:44:56 +08:00
Fixed start event not being triggered when addAnimation is used on an empty track.
closes #634
This commit is contained in:
parent
6aca4bd141
commit
4912ea8975
@ -364,6 +364,17 @@ public class AnimationStateTest {
|
||||
}
|
||||
});
|
||||
|
||||
setup("add animation on empty track", // 14
|
||||
expect(0, "start", 0, 0), // s
|
||||
expect(0, "event 0", 0, 0), //
|
||||
expect(0, "event 14", 0.5f, 0.5f), //
|
||||
expect(0, "event 30", 1, 1), //
|
||||
expect(0, "complete 1", 1, 1), //
|
||||
expect(0, "end", 1, 1.1f) //
|
||||
);
|
||||
state.addAnimation(0, "events1", false, 0);
|
||||
run(0.1f, 1.9f);
|
||||
|
||||
System.out.println("AnimationState tests passed.");
|
||||
}
|
||||
|
||||
|
||||
@ -301,7 +301,7 @@ public class AnimationState {
|
||||
last = last.next;
|
||||
last.next = entry;
|
||||
} else
|
||||
tracks.set(trackIndex, entry);
|
||||
setCurrent(trackIndex, entry);
|
||||
|
||||
if (delay <= 0) {
|
||||
if (last != null)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user