getBones method

List<Bone> getBones()

The skeleton's bones, sorted parent first. The root bone is always the first bone.

Implementation

List<Bone> getBones() {
  final List<Bone> bones = [];
  final numBones = _bindings.spine_skeleton_get_num_bones(_skeleton);
  final nativeBones = _bindings.spine_skeleton_get_bones(_skeleton);
  for (int i = 0; i < numBones; i++) {
    bones.add(Bone._(nativeBones[i]));
  }
  return bones;
}