mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 16:26:40 +08:00
[libgdx] Use binarySearch method without step param.
This commit is contained in:
parent
86cfefe30d
commit
2677eff35c
@ -690,7 +690,7 @@ public class Animation {
|
||||
if (time >= frames[frames.length - 1]) // Time is after last frame.
|
||||
frameIndex = frames.length - 1;
|
||||
else
|
||||
frameIndex = binarySearch(frames, time, 1) - 1;
|
||||
frameIndex = binarySearch(frames, time) - 1;
|
||||
|
||||
String attachmentName = attachmentNames[frameIndex];
|
||||
slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slotIndex, attachmentName));
|
||||
|
||||
@ -827,7 +827,10 @@ public class AnimationState {
|
||||
this.timeScale = timeScale;
|
||||
}
|
||||
|
||||
/** The listener for events generated by this track entry, or null. */
|
||||
/** The listener for events generated by this track entry, or null.
|
||||
* <p>
|
||||
* A track entry returned from {@link AnimationState#setAnimation(int, Animation, boolean)} is already the current animation
|
||||
* for the track, so the track entry listener {@link AnimationStateListener#start(TrackEntry)} will not be called. */
|
||||
public AnimationStateListener getListener () {
|
||||
return listener;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user