Skip to content

Commit

Permalink
[haxe] Port of commit c2fe1a3, Added TrackEntry IsNextReady. See #2547.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidetan committed Jun 11, 2024
1 parent 9f42570 commit 0e9a004
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spine-haxe/spine-haxe/spine/animation/TrackEntry.hx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,16 @@ class TrackEntry implements Poolable {
/** Returns true if this track entry has been applied at least once.
* <p>
* See {@link AnimationState#apply(Skeleton)}. */
public function wasApplied () {
public function wasApplied() {
return nextTrackLast != -1;
}

/** Returns true if there is a {@link #getNext()} track entry and it will become the current track entry during the next
* {@link AnimationState#update(float)}. */
public function isNextReady():Bool {
return next != null && nextTrackLast - next.delay >= 0;
}

public function reset():Void {
next = null;
previous = null;
Expand Down

0 comments on commit 0e9a004

Please sign in to comment.