mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[libgdx] Fixed having a physics reset all timeline in a slider animation.
This commit is contained in:
parent
2bd00b192c
commit
64ed135e49
@ -1903,7 +1903,8 @@ public class Animation {
|
||||
}
|
||||
|
||||
static public interface ConstraintTimeline {
|
||||
/** The index of the constraint in {@link Skeleton#getConstraints()} that will be changed when this timeline is applied. */
|
||||
/** The index of the constraint in {@link Skeleton#getConstraints()} that will be changed when this timeline is applied, or
|
||||
* -1 if a specific constraint will not be changed. */
|
||||
public int getConstraintIndex ();
|
||||
}
|
||||
|
||||
|
||||
@ -110,8 +110,10 @@ public class Slider extends Constraint<Slider, SliderData, SliderPose> {
|
||||
skeleton.constrained(physics[ii]);
|
||||
} else
|
||||
skeleton.constrained(constraints[timeline.constraintIndex]);
|
||||
} else if (t instanceof ConstraintTimeline timeline) //
|
||||
skeleton.constrained(constraints[timeline.getConstraintIndex()]);
|
||||
} else if (t instanceof ConstraintTimeline timeline) {
|
||||
int constraintIndex = timeline.getConstraintIndex();
|
||||
if (constraintIndex != -1) skeleton.constrained(constraints[constraintIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user