Reset draw order in setSlotsToSetupPose.

This commit is contained in:
NathanSweet 2013-09-25 10:17:35 +02:00
parent 6f2cc72aaf
commit 1e30ad1b72
3 changed files with 4 additions and 2 deletions

View File

@ -120,6 +120,7 @@ void Skeleton_setBonesToSetupPose (const Skeleton* self) {
void Skeleton_setSlotsToSetupPose (const Skeleton* self) {
int i;
memcpy(self->drawOrder, self->slots, self->slotCount * sizeof(int));
for (i = 0; i < self->slotCount; ++i)
Slot_setToSetupPose(self->slots[i]);
}

View File

@ -110,6 +110,8 @@ namespace Spine {
public void SetSlotsToSetupPose () {
List<Slot> slots = this.slots;
drawOrder.Clear();
drawOrder.AddRange(slots);
for (int i = 0, n = slots.Count; i < n; i++)
slots[i].SetToSetupPose(i);
}

View File

@ -120,9 +120,8 @@ public class Skeleton {
}
public void setSlotsToSetupPose () {
drawOrder.clear();
drawOrder.addAll(slots);
Array<Slot> slots = this.slots;
System.arraycopy(slots.items, 0, drawOrder.items, 0, slots.size);
for (int i = 0, n = slots.size; i < n; i++)
slots.get(i).setToSetupPose(i);
}