mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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]);
|
skeleton.constrained(physics[ii]);
|
||||||
} else
|
} else
|
||||||
skeleton.constrained(constraints[timeline.constraintIndex]);
|
skeleton.constrained(constraints[timeline.constraintIndex]);
|
||||||
} else if (Std.isOfType(t, ConstraintTimeline)) //
|
} else if (Std.isOfType(t, ConstraintTimeline)) {
|
||||||
skeleton.constrained(constraints[cast(t, ConstraintTimeline).getConstraintIndex()]);
|
var constraintIndex = cast(t, ConstraintTimeline).getConstraintIndex();
|
||||||
|
if (constraintIndex != -1)
|
||||||
|
skeleton.constrained(constraints[constraintIndex]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
package spine.animation;
|
package spine.animation;
|
||||||
|
|
||||||
interface ConstraintTimeline {
|
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;
|
public function getConstraintIndex():Int;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user