|
@@ -32,24 +32,24 @@ package spine.animation;
|
|
import spine.animation.Listeners.EventListeners;
|
|
import spine.animation.Listeners.EventListeners;
|
|
import spine.Poolable;
|
|
import spine.Poolable;
|
|
|
|
|
|
-/** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.
|
|
|
|
|
|
+/** Stores settings and other state for the playback of an animation on an spine.animation.AnimationState track.
|
|
* <p>
|
|
* <p>
|
|
- * References to a track entry must not be kept after the {@link AnimationStateListener#dispose(TrackEntry)} event occurs. */
|
|
|
|
|
|
+ * References to a track entry must not be kept after the AnimationStateListener.dispose(TrackEntry) event occurs. */
|
|
class TrackEntry implements Poolable {
|
|
class TrackEntry implements Poolable {
|
|
/** The animation to apply for this track entry. */
|
|
/** The animation to apply for this track entry. */
|
|
public var animation:Animation;
|
|
public var animation:Animation;
|
|
- /** The animation queued to start after this animation, or null if there is none. <code>next</code> makes up a doubly linked
|
|
|
|
|
|
+ /** The animation queued to start after this animation, or null if there is none. next makes up a doubly linked
|
|
* list.
|
|
* list.
|
|
* <p>
|
|
* <p>
|
|
- * See {@link AnimationState#clearNext(TrackEntry)} to truncate the list. */
|
|
|
|
|
|
+ * See spine.animation.AnimationState.clearNext(TrackEntry) to truncate the list. */
|
|
public var next:TrackEntry;
|
|
public var next:TrackEntry;
|
|
- /** The animation queued to play before this animation, or null. <code>previous</code> makes up a doubly linked list. */
|
|
|
|
|
|
+ /** The animation queued to play before this animation, or null. previous makes up a doubly linked list. */
|
|
public var previous:TrackEntry;
|
|
public var previous:TrackEntry;
|
|
/** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
|
|
/** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
|
|
- * mixing is currently occurring. When mixing from multiple animations, <code>mixingFrom</code> makes up a linked list. */
|
|
|
|
|
|
+ * mixing is currently occurring. When mixing from multiple animations, mixingFrom makes up a linked list. */
|
|
public var mixingFrom:TrackEntry;
|
|
public var mixingFrom:TrackEntry;
|
|
/** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
|
|
/** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
|
|
- * currently occurring. When mixing to multiple animations, <code>mixingTo</code> makes up a linked list. */
|
|
|
|
|
|
+ * currently occurring. When mixing to multiple animations, mixingTo makes up a linked list. */
|
|
public var mixingTo:TrackEntry;
|
|
public var mixingTo:TrackEntry;
|
|
public var onStart:Listeners = new Listeners();
|
|
public var onStart:Listeners = new Listeners();
|
|
public var onInterrupt:Listeners = new Listeners();
|
|
public var onInterrupt:Listeners = new Listeners();
|
|
@@ -59,7 +59,7 @@ class TrackEntry implements Poolable {
|
|
public var onEvent:EventListeners = new EventListeners();
|
|
public var onEvent:EventListeners = new EventListeners();
|
|
/** The index of the track where this track entry is either current or queued.
|
|
/** The index of the track where this track entry is either current or queued.
|
|
* <p>
|
|
* <p>
|
|
- * See {@link AnimationState#getCurrent(int)}. */
|
|
|
|
|
|
+ * See spine.animation.AnimationState.getCurrent(int). */
|
|
public var trackIndex:Int = 0;
|
|
public var trackIndex:Int = 0;
|
|
/** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
|
/** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
|
* duration. */
|
|
* duration. */
|
|
@@ -71,58 +71,58 @@ class TrackEntry implements Poolable {
|
|
* <p>
|
|
* <p>
|
|
* When mixing between animations that key the same property, if a lower track also keys that property then the value will
|
|
* When mixing between animations that key the same property, if a lower track also keys that property then the value will
|
|
* briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
|
|
* briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
|
|
- * while the second animation mixes from 0% to 100%. Setting <code>holdPrevious</code> to true applies the first animation
|
|
|
|
|
|
+ * while the second animation mixes from 0% to 100%. Setting holdPrevious to true applies the first animation
|
|
* at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
|
|
* at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
|
|
* keys the property, only when a higher track also keys the property.
|
|
* keys the property, only when a higher track also keys the property.
|
|
* <p>
|
|
* <p>
|
|
- * Snapping will occur if <code>holdPrevious</code> is true and this animation does not key all the same properties as the
|
|
|
|
|
|
+ * Snapping will occur if holdPrevious is true and this animation does not key all the same properties as the
|
|
* previous animation. */
|
|
* previous animation. */
|
|
public var holdPrevious:Bool = false;
|
|
public var holdPrevious:Bool = false;
|
|
- /** When the mix percentage ({@link #getMixTime()} / {@link #getMixDuration()}) is less than the
|
|
|
|
- * <code>eventThreshold</code>, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
|
|
|
|
|
|
+ /** When the mix percentage (TrackEntry.getMixTime() / TrackEntry.getMixDuration()) is less than the
|
|
|
|
+ * eventThreshold, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
|
|
* timelines are not applied while this animation is being mixed out. */
|
|
* timelines are not applied while this animation is being mixed out. */
|
|
public var eventThreshold:Float = 0;
|
|
public var eventThreshold:Float = 0;
|
|
- /** When the mix percentage ({@link #getMixTime()} / {@link #getMixDuration()}) is less than the
|
|
|
|
- * <code>mixAttachmentThreshold</code>, attachment timelines are applied while this animation is being mixed out. Defaults
|
|
|
|
|
|
+ /** When the mix percentage (TrackEntry.getMixTime() / TrackEntry.getMixDuration()) is less than the
|
|
|
|
+ * mixAttachmentThreshold, attachment timelines are applied while this animation is being mixed out. Defaults
|
|
* to 0, so attachment timelines are not applied while this animation is being mixed out. */
|
|
* to 0, so attachment timelines are not applied while this animation is being mixed out. */
|
|
public var mixAttachmentThreshold:Float = 0;
|
|
public var mixAttachmentThreshold:Float = 0;
|
|
- /** When {@link #getAlpha()} is greater than <code>alphaAttachmentThreshold</code>, attachment timelines are applied.
|
|
|
|
|
|
+ /** When TrackEntry.getAlpha() is greater than alphaAttachmentThreshold, attachment timelines are applied.
|
|
* Defaults to 0, so attachment timelines are always applied. */
|
|
* Defaults to 0, so attachment timelines are always applied. */
|
|
public var alphaAttachmentThreshold:Float = 0;
|
|
public var alphaAttachmentThreshold:Float = 0;
|
|
- /** When the mix percentage ({@link #getMixTime()} / {@link #getMixDuration()}) is less than the
|
|
|
|
- * <code>mixDrawOrderThreshold</code>, draw order timelines are applied while this animation is being mixed out. Defaults to
|
|
|
|
|
|
+ /** When the mix percentage (TrackEntry.getMixTime() / TrackEntry.getMixDuration()) is less than the
|
|
|
|
+ * mixDrawOrderThreshold, draw order timelines are applied while this animation is being mixed out. Defaults to
|
|
* 0, so draw order timelines are not applied while this animation is being mixed out. */
|
|
* 0, so draw order timelines are not applied while this animation is being mixed out. */
|
|
public var mixDrawOrderThreshold:Float = 0;
|
|
public var mixDrawOrderThreshold:Float = 0;
|
|
/** Seconds when this animation starts, both initially and after looping. Defaults to 0.
|
|
/** Seconds when this animation starts, both initially and after looping. Defaults to 0.
|
|
* <p>
|
|
* <p>
|
|
- * When changing the <code>animationStart</code> time, it often makes sense to set {@link #getAnimationLast()} to the same
|
|
|
|
|
|
+ * When changing the animationStart time, it often makes sense to set TrackEntry.getAnimationLast() to the same
|
|
* value to prevent timeline keys before the start time from triggering. */
|
|
* value to prevent timeline keys before the start time from triggering. */
|
|
public var animationStart:Float = 0;
|
|
public var animationStart:Float = 0;
|
|
/** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
|
|
/** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
|
|
- * loop back to {@link #getAnimationStart()} at this time. Defaults to the animation {@link Animation#duration}. */
|
|
|
|
|
|
+ * loop back to TrackEntry.getAnimationStart() at this time. Defaults to the animation spine.animation.Animation.duration. */
|
|
public var animationEnd:Float = 0;
|
|
public var animationEnd:Float = 0;
|
|
/** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
|
|
/** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
|
|
- * animation is applied, event timelines will fire all events between the <code>animationLast</code> time (exclusive) and
|
|
|
|
- * <code>animationTime</code> (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
|
|
|
|
|
|
+ * animation is applied, event timelines will fire all events between the animationLast time (exclusive) and
|
|
|
|
+ * animationTime (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
|
|
* is applied. */
|
|
* is applied. */
|
|
public var animationLast:Float = 0;
|
|
public var animationLast:Float = 0;
|
|
public var nextAnimationLast:Float = 0;
|
|
public var nextAnimationLast:Float = 0;
|
|
|
|
|
|
/** Seconds to postpone playing the animation. Must be >= 0. When this track entry is the current track entry,
|
|
/** Seconds to postpone playing the animation. Must be >= 0. When this track entry is the current track entry,
|
|
- * <code>delay</code> postpones incrementing the {@link #getTrackTime()}. When this track entry is queued,
|
|
|
|
- * <code>delay</code> is the time from the start of the previous animation to when this track entry will become the current
|
|
|
|
- * track entry (ie when the previous track entry {@link TrackEntry#getTrackTime()} >= this track entry's
|
|
|
|
- * <code>delay</code>).
|
|
|
|
|
|
+ * delay postpones incrementing the TrackEntry.getTrackTime(). When this track entry is queued,
|
|
|
|
+ * delay is the time from the start of the previous animation to when this track entry will become the current
|
|
|
|
+ * track entry (ie when the previous track entry TrackEntry.getTrackTime() >= this track entry's
|
|
|
|
+ * delay).
|
|
* <p>
|
|
* <p>
|
|
- * {@link #getTimeScale()} affects the delay.
|
|
|
|
|
|
+ * TrackEntry.getTimeScale() affects the delay.
|
|
* <p>
|
|
* <p>
|
|
- * When passing <code>delay</code> <= 0 to {@link AnimationState#addAnimation(int, Animation, boolean, float)} this
|
|
|
|
- * <code>delay</code> is set using a mix duration from {@link AnimationStateData}. To change the {@link #getMixDuration()}
|
|
|
|
- * afterward, use {@link #setMixDuration(float, float)} so this <code>delay</code> is adjusted. */
|
|
|
|
|
|
+ * When passing delay <= 0 to spine.animation.AnimationState.addAnimation(int, Animation, boolean, float) this
|
|
|
|
+ * delay is set using a mix duration from spine.animation.AnimationStateData. To change the TrackEntry.getMixDuration()
|
|
|
|
+ * afterward, use TrackEntry.setMixDuration(float, float) so this delay is adjusted. */
|
|
public var delay(default, set):Float = 0;
|
|
public var delay(default, set):Float = 0;
|
|
|
|
|
|
/** Current time in seconds this track entry has been the current track entry. The track time determines
|
|
/** Current time in seconds this track entry has been the current track entry. The track time determines
|
|
- * {@link #getAnimationTime()}. The track time can be set to start the animation at a time other than 0, without affecting
|
|
|
|
|
|
+ * TrackEntry.getAnimationTime(). The track time can be set to start the animation at a time other than 0, without affecting
|
|
* looping. */
|
|
* looping. */
|
|
public var trackTime:Float = 0;
|
|
public var trackTime:Float = 0;
|
|
public var trackLast:Float = 0;
|
|
public var trackLast:Float = 0;
|
|
@@ -132,22 +132,22 @@ class TrackEntry implements Poolable {
|
|
* is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
|
|
* is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
|
|
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
* <p>
|
|
* <p>
|
|
- * It may be desired to use {@link AnimationState#addEmptyAnimation(int, float, float)} rather than have the animation
|
|
|
|
|
|
+ * It may be desired to use spine.animation.AnimationState.addEmptyAnimation(int, float, float) rather than have the animation
|
|
* abruptly cease being applied. */
|
|
* abruptly cease being applied. */
|
|
public var trackEnd:Float = 0;
|
|
public var trackEnd:Float = 0;
|
|
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
* faster. Defaults to 1.
|
|
* faster. Defaults to 1.
|
|
* <p>
|
|
* <p>
|
|
- * Values < 0 are not supported. To play an animation in reverse, use {@link #getReverse()}.
|
|
|
|
|
|
+ * Values < 0 are not supported. To play an animation in reverse, use TrackEntry.getReverse().
|
|
* <p>
|
|
* <p>
|
|
- * {@link #getMixTime()} is not affected by track entry time scale, so {@link #getMixDuration()} may need to be adjusted to
|
|
|
|
|
|
+ * TrackEntry.getMixTime() is not affected by track entry time scale, so TrackEntry.getMixDuration() may need to be adjusted to
|
|
* match the animation speed.
|
|
* match the animation speed.
|
|
* <p>
|
|
* <p>
|
|
- * When using {@link AnimationState#addAnimation(int, Animation, boolean, float)} with a <code>delay</code> <= 0, the
|
|
|
|
- * {@link #getDelay()} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
|
|
|
|
|
|
+ * When using spine.animation.AnimationState.addAnimation(int, Animation, boolean, float) with a delay <= 0, the
|
|
|
|
+ * TrackEntry.getDelay() is set using the mix duration from the spine.animation.AnimationStateData, assuming time scale to be 1. If
|
|
* the time scale is not 1, the delay may need to be adjusted.
|
|
* the time scale is not 1, the delay may need to be adjusted.
|
|
* <p>
|
|
* <p>
|
|
- * See AnimationState {@link AnimationState#getTimeScale()} for affecting all animations. */
|
|
|
|
|
|
+ * See AnimationState spine.animation.AnimationState.getTimeScale() for affecting all animations. */
|
|
public var timeScale:Float = 0;
|
|
public var timeScale:Float = 0;
|
|
/** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
|
|
/** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
|
|
* to 1, which overwrites the skeleton's current pose with this animation.
|
|
* to 1, which overwrites the skeleton's current pose with this animation.
|
|
@@ -155,34 +155,34 @@ class TrackEntry implements Poolable {
|
|
* Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
|
|
* Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
|
|
* use alpha on track 0 if the skeleton pose is from the last frame render. */
|
|
* use alpha on track 0 if the skeleton pose is from the last frame render. */
|
|
public var alpha:Float = 0;
|
|
public var alpha:Float = 0;
|
|
- /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
|
|
|
|
- * slightly more than <code>mixDuration</code> when the mix is complete. */
|
|
|
|
|
|
+ /** Seconds from 0 to the TrackEntry.getMixDuration() when mixing from the previous animation to this animation. May be
|
|
|
|
+ * slightly more than mixDuration when the mix is complete. */
|
|
public var mixTime:Float = 0;
|
|
public var mixTime:Float = 0;
|
|
/** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
|
|
/** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
|
|
- * {@link AnimationStateData#getMix(Animation, Animation)} based on the animation before this animation (if any).
|
|
|
|
|
|
+ * spine.animation.AnimationStateData.getMix(Animation, Animation) based on the animation before this animation (if any).
|
|
* <p>
|
|
* <p>
|
|
* A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
|
|
* A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
|
|
* properties it was animating. A mix duration of 0 can be set at any time to end the mix on the next
|
|
* properties it was animating. A mix duration of 0 can be set at any time to end the mix on the next
|
|
- * {@link AnimationState#update(float) update}.
|
|
|
|
|
|
+ * spine.animation.AnimationState.update(float) update.
|
|
* <p>
|
|
* <p>
|
|
- * The <code>mixDuration</code> can be set manually rather than use the value from
|
|
|
|
- * {@link AnimationStateData#getMix(Animation, Animation)}. In that case, the <code>mixDuration</code> can be set for a new
|
|
|
|
- * track entry only before {@link AnimationState#update(float)} is first called.
|
|
|
|
|
|
+ * The mixDuration can be set manually rather than use the value from
|
|
|
|
+ * spine.animation.AnimationStateData.getMix(Animation, Animation). In that case, the mixDuration can be set for a new
|
|
|
|
+ * track entry only before spine.animation.AnimationState.update(float) is first called.
|
|
* <p>
|
|
* <p>
|
|
- * When using {@link AnimationState#addAnimation(int, Animation, boolean, float)} with a <code>delay</code> <= 0, the
|
|
|
|
- * {@link #getDelay()} is set using the mix duration from the {@link AnimationStateData}. If <code>mixDuration</code> is set
|
|
|
|
|
|
+ * When using spine.animation.AnimationState.addAnimation(int, Animation, boolean, float) with a delay <= 0, the
|
|
|
|
+ * TrackEntry.getDelay() is set using the mix duration from the spine.animation.AnimationStateData. If mixDuration is set
|
|
* afterward, the delay may need to be adjusted. For example:<br>
|
|
* afterward, the delay may need to be adjusted. For example:<br>
|
|
- * <code>entry.delay = entry.previous.getTrackComplete() - entry.mixDuration;</code><br>
|
|
|
|
- * Alternatively, {@link #setMixDuration(float, float)} can be used to recompute the delay:<br>
|
|
|
|
- * <code>entry.setMixDuration(0.25f, 0);</code> */
|
|
|
|
|
|
+ * entry.delay = entry.previous.getTrackComplete() - entry.mixDuration;<br>
|
|
|
|
+ * Alternatively, TrackEntry.setMixDuration(float, float) can be used to recompute the delay:<br>
|
|
|
|
+ * entry.setMixDuration(0.25f, 0); */
|
|
public var mixDuration:Float = 0;
|
|
public var mixDuration:Float = 0;
|
|
public var interruptAlpha:Float = 0;
|
|
public var interruptAlpha:Float = 0;
|
|
public var totalAlpha:Float = 0;
|
|
public var totalAlpha:Float = 0;
|
|
- /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}.
|
|
|
|
|
|
+ /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to spine.animation.MixBlend.replace.
|
|
* <p>
|
|
* <p>
|
|
- * Track entries on track 0 ignore this setting and always use {@link MixBlend#first}.
|
|
|
|
|
|
+ * Track entries on track 0 ignore this setting and always use spine.animation.MixBlend.first.
|
|
* <p>
|
|
* <p>
|
|
- * The <code>mixBlend</code> can be set for a new track entry only before {@link AnimationState#apply(Skeleton)} is first
|
|
|
|
|
|
+ * The mixBlend can be set for a new track entry only before spine.animation.AnimationState.apply(Skeleton) is first
|
|
* called. */
|
|
* called. */
|
|
public var mixBlend:MixBlend = MixBlend.replace;
|
|
public var mixBlend:MixBlend = MixBlend.replace;
|
|
public var timelineMode:Array<Int> = new Array<Int>();
|
|
public var timelineMode:Array<Int> = new Array<Int>();
|
|
@@ -202,12 +202,12 @@ class TrackEntry implements Poolable {
|
|
|
|
|
|
public function new() {}
|
|
public function new() {}
|
|
|
|
|
|
- /** Uses {@link #getTrackTime()} to compute the <code>animationTime</code>. When the <code>trackTime</code> is 0, the
|
|
|
|
- * <code>animationTime</code> is equal to the <code>animationStart</code> time.
|
|
|
|
|
|
+ /** Uses TrackEntry.getTrackTime() to compute the animationTime. When the trackTime is 0, the
|
|
|
|
+ * animationTime is equal to the animationStart time.
|
|
* <p>
|
|
* <p>
|
|
- * The <code>animationTime</code> is between {@link #getAnimationStart()} and {@link #getAnimationEnd()}, except if this
|
|
|
|
- * track entry is non-looping and {@link #getAnimationEnd()} is >= to the animation {@link Animation#duration}, then
|
|
|
|
- * <code>animationTime</code> continues to increase past {@link #getAnimationEnd()}. */
|
|
|
|
|
|
+ * The animationTime is between TrackEntry.getAnimationStart() and TrackEntry.getAnimationEnd(), except if this
|
|
|
|
+ * track entry is non-looping and TrackEntry.getAnimationEnd() is >= to the animation spine.animation.Animation.duration, then
|
|
|
|
+ * animationTime continues to increase past TrackEntry.getAnimationEnd(). */
|
|
public function getAnimationTime():Float {
|
|
public function getAnimationTime():Float {
|
|
if (loop) {
|
|
if (loop) {
|
|
var duration:Float = animationEnd - animationStart;
|
|
var duration:Float = animationEnd - animationStart;
|
|
@@ -218,9 +218,9 @@ class TrackEntry implements Poolable {
|
|
return Math.min(trackTime + animationStart, animationEnd);
|
|
return Math.min(trackTime + animationStart, animationEnd);
|
|
}
|
|
}
|
|
|
|
|
|
- /** If this track entry is non-looping, the track time in seconds when {@link #getAnimationEnd()} is reached, or the current
|
|
|
|
- * {@link #getTrackTime()} if it has already been reached. If this track entry is looping, the track time when this
|
|
|
|
- * animation will reach its next {@link #getAnimationEnd()} (the next loop completion). */
|
|
|
|
|
|
+ /** If this track entry is non-looping, the track time in seconds when TrackEntry.getAnimationEnd() is reached, or the current
|
|
|
|
+ * TrackEntry.getTrackTime() if it has already been reached. If this track entry is looping, the track time when this
|
|
|
|
+ * animation will reach its next TrackEntry.getAnimationEnd() (the next loop completion). */
|
|
public function getTrackComplete():Float {
|
|
public function getTrackComplete():Float {
|
|
var duration:Float = animationEnd - animationStart;
|
|
var duration:Float = animationEnd - animationStart;
|
|
if (duration != 0) {
|
|
if (duration != 0) {
|
|
@@ -234,13 +234,13 @@ class TrackEntry implements Poolable {
|
|
|
|
|
|
/** Returns true if this track entry has been applied at least once.
|
|
/** Returns true if this track entry has been applied at least once.
|
|
* <p>
|
|
* <p>
|
|
- * See {@link AnimationState#apply(Skeleton)}. */
|
|
|
|
|
|
+ * See spine.animation.AnimationState.apply(Skeleton). */
|
|
public function wasApplied() {
|
|
public function wasApplied() {
|
|
return nextTrackLast != -1;
|
|
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)}. */
|
|
|
|
|
|
+ /** Returns true if there is a TrackEntry.getNext() track entry and it will become the current track entry during the next
|
|
|
|
+ * spine.animation.AnimationState.update(float). */
|
|
public function isNextReady():Bool {
|
|
public function isNextReady():Bool {
|
|
return next != null && nextTrackLast - next.delay >= 0;
|
|
return next != null && nextTrackLast - next.delay >= 0;
|
|
}
|
|
}
|
|
@@ -263,9 +263,9 @@ class TrackEntry implements Poolable {
|
|
}
|
|
}
|
|
|
|
|
|
/** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the
|
|
/** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the
|
|
- * long way around when using {@link #getAlpha()} and starting animations on other tracks.
|
|
|
|
|
|
+ * long way around when using TrackEntry.getAlpha() and starting animations on other tracks.
|
|
* <p>
|
|
* <p>
|
|
- * Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:
|
|
|
|
|
|
+ * Mixing with spine.animation.MixBlend.replace involves finding a rotation between two others, which has two possible solutions:
|
|
* the short way or the long way around. The two rotations likely change over time, so which direction is the short or long
|
|
* the short way or the long way around. The two rotations likely change over time, so which direction is the short or long
|
|
* way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the
|
|
* way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the
|
|
* long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */
|
|
* long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */
|
|
@@ -273,10 +273,10 @@ class TrackEntry implements Poolable {
|
|
timelinesRotation.resize(0);
|
|
timelinesRotation.resize(0);
|
|
}
|
|
}
|
|
|
|
|
|
- /** Sets both {@link #getMixDuration()} and {@link #getDelay()}.
|
|
|
|
- * @param mixDuration If > 0, sets {@link TrackEntry#getDelay()}. If <= 0, the delay set is the duration of the previous track
|
|
|
|
- * entry minus the specified mix duration plus the specified <code>delay</code> (ie the mix ends at
|
|
|
|
- * (<code>delay</code> = 0) or before (<code>delay</code> < 0) the previous track entry duration). If the previous
|
|
|
|
|
|
+ /** Sets both TrackEntry.getMixDuration() and TrackEntry.getDelay().
|
|
|
|
+ * @param mixDuration If > 0, sets TrackEntry.getDelay(). If <= 0, the delay set is the duration of the previous track
|
|
|
|
+ * entry minus the specified mix duration plus the specified delay (ie the mix ends at
|
|
|
|
+ * (delay = 0) or before (delay < 0) the previous track entry duration). If the previous
|
|
* entry is looping, its next loop completion is used instead of its duration. */
|
|
* entry is looping, its next loop completion is used instead of its duration. */
|
|
public function setMixDurationWithDelay(mixDuration:Float):Float {
|
|
public function setMixDurationWithDelay(mixDuration:Float):Float {
|
|
this.mixDuration = mixDuration;
|
|
this.mixDuration = mixDuration;
|