mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Find bones and slots by index, not name.
This commit is contained in:
parent
db92cb3667
commit
2614811ef8
@ -59,8 +59,8 @@ public class IkConstraint implements Updatable {
|
|||||||
|
|
||||||
bones = new Array(data.bones.size);
|
bones = new Array(data.bones.size);
|
||||||
for (BoneData boneData : data.bones)
|
for (BoneData boneData : data.bones)
|
||||||
bones.add(skeleton.findBone(boneData.name));
|
bones.add(skeleton.bones.get(boneData.index));
|
||||||
target = skeleton.findBone(data.target.name);
|
target = skeleton.bones.get(data.target.index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Copy constructor. */
|
/** Copy constructor. */
|
||||||
|
|||||||
@ -66,8 +66,8 @@ public class PathConstraint implements Updatable {
|
|||||||
this.data = data;
|
this.data = data;
|
||||||
bones = new Array(data.bones.size);
|
bones = new Array(data.bones.size);
|
||||||
for (BoneData boneData : data.bones)
|
for (BoneData boneData : data.bones)
|
||||||
bones.add(skeleton.findBone(boneData.name));
|
bones.add(skeleton.bones.get(boneData.index));
|
||||||
target = skeleton.findSlot(data.target.name);
|
target = skeleton.slots.get(data.target.index);
|
||||||
position = data.position;
|
position = data.position;
|
||||||
spacing = data.spacing;
|
spacing = data.spacing;
|
||||||
mixRotate = data.mixRotate;
|
mixRotate = data.mixRotate;
|
||||||
|
|||||||
@ -59,8 +59,8 @@ public class TransformConstraint implements Updatable {
|
|||||||
mixShearY = data.mixShearY;
|
mixShearY = data.mixShearY;
|
||||||
bones = new Array(data.bones.size);
|
bones = new Array(data.bones.size);
|
||||||
for (BoneData boneData : data.bones)
|
for (BoneData boneData : data.bones)
|
||||||
bones.add(skeleton.findBone(boneData.name));
|
bones.add(skeleton.bones.get(boneData.index));
|
||||||
target = skeleton.findBone(data.target.name);
|
target = skeleton.bones.get(data.target.index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Copy constructor. */
|
/** Copy constructor. */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user