mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[libgdx] Constraint clean up.
This commit is contained in:
parent
f08d58dc98
commit
66435fea9e
@ -61,22 +61,13 @@ public class IkConstraint implements Updatable {
|
||||
|
||||
target = skeleton.bones.get(data.target.index);
|
||||
|
||||
mix = data.mix;
|
||||
softness = data.softness;
|
||||
bendDirection = data.bendDirection;
|
||||
compress = data.compress;
|
||||
stretch = data.stretch;
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
/** Copy constructor. */
|
||||
public IkConstraint (IkConstraint constraint, Skeleton skeleton) {
|
||||
this(constraint.data, skeleton);
|
||||
|
||||
mix = constraint.mix;
|
||||
softness = constraint.softness;
|
||||
bendDirection = constraint.bendDirection;
|
||||
compress = constraint.compress;
|
||||
stretch = constraint.stretch;
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
public void setToSetupPose () {
|
||||
|
||||
@ -72,22 +72,13 @@ public class PathConstraint implements Updatable {
|
||||
|
||||
slot = skeleton.slots.get(data.slot.index);
|
||||
|
||||
position = data.position;
|
||||
spacing = data.spacing;
|
||||
mixRotate = data.mixRotate;
|
||||
mixX = data.mixX;
|
||||
mixY = data.mixY;
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
/** Copy constructor. */
|
||||
public PathConstraint (PathConstraint constraint, Skeleton skeleton) {
|
||||
this(constraint.data, skeleton);
|
||||
|
||||
position = constraint.position;
|
||||
spacing = constraint.spacing;
|
||||
mixRotate = constraint.mixRotate;
|
||||
mixX = constraint.mixX;
|
||||
mixY = constraint.mixY;
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
public void setToSetupPose () {
|
||||
|
||||
@ -61,26 +61,13 @@ public class PhysicsConstraint implements Updatable {
|
||||
|
||||
bone = skeleton.bones.get(data.bone.index);
|
||||
|
||||
inertia = data.inertia;
|
||||
strength = data.strength;
|
||||
damping = data.damping;
|
||||
massInverse = data.massInverse;
|
||||
wind = data.wind;
|
||||
gravity = data.gravity;
|
||||
mix = data.mix;
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
/** Copy constructor. */
|
||||
public PhysicsConstraint (PhysicsConstraint constraint, Skeleton skeleton) {
|
||||
this(constraint.data, skeleton);
|
||||
|
||||
inertia = constraint.inertia;
|
||||
strength = constraint.strength;
|
||||
damping = constraint.damping;
|
||||
massInverse = constraint.massInverse;
|
||||
wind = constraint.wind;
|
||||
gravity = constraint.gravity;
|
||||
mix = constraint.mix;
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
public void reset () {
|
||||
|
||||
@ -62,24 +62,13 @@ public class TransformConstraint implements Updatable {
|
||||
|
||||
source = skeleton.bones.get(data.source.index);
|
||||
|
||||
mixRotate = data.mixRotate;
|
||||
mixX = data.mixX;
|
||||
mixY = data.mixY;
|
||||
mixScaleX = data.mixScaleX;
|
||||
mixScaleY = data.mixScaleY;
|
||||
mixShearY = data.mixShearY;
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
/** Copy constructor. */
|
||||
public TransformConstraint (TransformConstraint constraint, Skeleton skeleton) {
|
||||
this(constraint.data, skeleton);
|
||||
|
||||
mixRotate = constraint.mixRotate;
|
||||
mixX = constraint.mixX;
|
||||
mixY = constraint.mixY;
|
||||
mixScaleX = constraint.mixScaleX;
|
||||
mixScaleY = constraint.mixScaleY;
|
||||
mixShearY = constraint.mixShearY;
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
public void setToSetupPose () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user