mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 19:11:36 +08:00
[haxe] Port of commit 64ed135: Fixed having a physics reset all timeline in a slider animation.
This commit is contained in:
parent
9605df9737
commit
842c96a511
@ -117,8 +117,11 @@ class Slider extends Constraint<Slider, SliderData, SliderPose> {
|
||||
skeleton.constrained(physics[ii]);
|
||||
} else
|
||||
skeleton.constrained(constraints[timeline.constraintIndex]);
|
||||
} else if (Std.isOfType(t, ConstraintTimeline)) //
|
||||
skeleton.constrained(constraints[cast(t, ConstraintTimeline).getConstraintIndex()]);
|
||||
} else if (Std.isOfType(t, ConstraintTimeline)) {
|
||||
var constraintIndex = cast(t, ConstraintTimeline).getConstraintIndex();
|
||||
if (constraintIndex != -1)
|
||||
skeleton.constrained(constraints[constraintIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
package spine.animation;
|
||||
|
||||
interface ConstraintTimeline {
|
||||
/** The index of the constraint in spine.Skeleton.constraints that will be changed when this timeline is applied. */
|
||||
/** The index of the constraint in spine.Skeleton.constraints that will be changed when this timeline is applied, or
|
||||
* -1 if a specific constraint will not be changed. */
|
||||
public function getConstraintIndex():Int;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user