Clean up.

This commit is contained in:
NathanSweet 2016-10-13 18:05:00 +02:00
parent aae761cd19
commit 3bf261dc4b
6 changed files with 8 additions and 8 deletions

View File

@ -557,7 +557,7 @@ public class Skeleton {
for (int i = 0, n = drawOrder.size; i < n; i++) {
Slot slot = drawOrder.get(i);
float[] vertices = null;
Attachment attachment = slot.getAttachment();
Attachment attachment = slot.attachment;
if (attachment instanceof RegionAttachment)
vertices = ((RegionAttachment)attachment).updateWorldVertices(slot, false);
else if (attachment instanceof MeshAttachment) //

View File

@ -60,7 +60,7 @@ public class SkeletonBounds {
for (int i = 0; i < slotCount; i++) {
Slot slot = slots.get(i);
Attachment attachment = slot.getAttachment();
Attachment attachment = slot.attachment;
if (attachment instanceof BoundingBoxAttachment) {
BoundingBoxAttachment boundingBox = (BoundingBoxAttachment)attachment;
boundingBoxes.add(boundingBox);

View File

@ -51,7 +51,7 @@ public class SkeletonMeshRenderer extends SkeletonRenderer<PolygonSpriteBatch> {
Array<Slot> drawOrder = skeleton.drawOrder;
for (int i = 0, n = drawOrder.size; i < n; i++) {
Slot slot = drawOrder.get(i);
Attachment attachment = slot.getAttachment();
Attachment attachment = slot.attachment;
Texture texture = null;
if (attachment instanceof RegionAttachment) {
RegionAttachment region = (RegionAttachment)attachment;

View File

@ -46,7 +46,7 @@ public class SkeletonRenderer<T extends Batch> {
Array<Slot> drawOrder = skeleton.drawOrder;
for (int i = 0, n = drawOrder.size; i < n; i++) {
Slot slot = drawOrder.get(i);
Attachment attachment = slot.getAttachment();
Attachment attachment = slot.attachment;
if (attachment instanceof RegionAttachment) {
RegionAttachment regionAttachment = (RegionAttachment)attachment;
float[] vertices = regionAttachment.updateWorldVertices(slot, premultipliedAlpha);

View File

@ -104,7 +104,7 @@ public class SkeletonRendererDebug {
Array<Slot> slots = skeleton.getSlots();
for (int i = 0, n = slots.size; i < n; i++) {
Slot slot = slots.get(i);
Attachment attachment = slot.getAttachment();
Attachment attachment = slot.attachment;
if (attachment instanceof RegionAttachment) {
RegionAttachment regionAttachment = (RegionAttachment)attachment;
float[] vertices = regionAttachment.updateWorldVertices(slot, false);
@ -120,7 +120,7 @@ public class SkeletonRendererDebug {
Array<Slot> slots = skeleton.getSlots();
for (int i = 0, n = slots.size; i < n; i++) {
Slot slot = slots.get(i);
Attachment attachment = slot.getAttachment();
Attachment attachment = slot.attachment;
if (!(attachment instanceof MeshAttachment)) continue;
MeshAttachment mesh = (MeshAttachment)attachment;
mesh.updateWorldVertices(slot, false);
@ -169,7 +169,7 @@ public class SkeletonRendererDebug {
Array<Slot> slots = skeleton.getSlots();
for (int i = 0, n = slots.size; i < n; i++) {
Slot slot = slots.get(i);
Attachment attachment = slot.getAttachment();
Attachment attachment = slot.attachment;
if (!(attachment instanceof PathAttachment)) continue;
PathAttachment path = (PathAttachment)attachment;
int nn = path.getWorldVerticesLength();

View File

@ -101,7 +101,7 @@ public class Skin {
for (Entry<Key, Attachment> entry : oldSkin.attachments.entries()) {
int slotIndex = entry.key.slotIndex;
Slot slot = skeleton.slots.get(slotIndex);
if (slot.getAttachment() == entry.value) {
if (slot.attachment == entry.value) {
Attachment attachment = getAttachment(slotIndex, entry.key.name);
if (attachment != null) slot.setAttachment(attachment);
}