mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 17:48:45 +08:00
Fixed resetTrack when a default mix time is used.
This commit is contained in:
parent
bc05861a0c
commit
fd81d31278
@ -293,6 +293,7 @@ public class AnimationState {
|
||||
|
||||
private void resetTrack (TrackEntry current) {
|
||||
TrackEntry entry = trackEntry(current.trackIndex, emptyAnimation, false, current);
|
||||
entry.mixDuration = 0;
|
||||
current.trackTime = 0;
|
||||
setCurrent(current.trackIndex, entry);
|
||||
}
|
||||
@ -394,6 +395,7 @@ public class AnimationState {
|
||||
* after {@link AnimationStateListener#end(TrackEntry)}. */
|
||||
public TrackEntry setAnimation (int trackIndex, Animation animation, boolean loop) {
|
||||
if (animation == null) throw new IllegalArgumentException("animation cannot be null.");
|
||||
// if (animation == null) animation = emptyAnimation; // BOZO - Test.
|
||||
TrackEntry current = expandToIndex(trackIndex);
|
||||
if (current != null) {
|
||||
if (current.nextTrackLast == -1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user