mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-27 04:01:24 +08:00
Clean up.
This commit is contained in:
parent
aae761cd19
commit
3bf261dc4b
@ -557,7 +557,7 @@ public class Skeleton {
|
|||||||
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
||||||
Slot slot = drawOrder.get(i);
|
Slot slot = drawOrder.get(i);
|
||||||
float[] vertices = null;
|
float[] vertices = null;
|
||||||
Attachment attachment = slot.getAttachment();
|
Attachment attachment = slot.attachment;
|
||||||
if (attachment instanceof RegionAttachment)
|
if (attachment instanceof RegionAttachment)
|
||||||
vertices = ((RegionAttachment)attachment).updateWorldVertices(slot, false);
|
vertices = ((RegionAttachment)attachment).updateWorldVertices(slot, false);
|
||||||
else if (attachment instanceof MeshAttachment) //
|
else if (attachment instanceof MeshAttachment) //
|
||||||
|
|||||||
@ -60,7 +60,7 @@ public class SkeletonBounds {
|
|||||||
|
|
||||||
for (int i = 0; i < slotCount; i++) {
|
for (int i = 0; i < slotCount; i++) {
|
||||||
Slot slot = slots.get(i);
|
Slot slot = slots.get(i);
|
||||||
Attachment attachment = slot.getAttachment();
|
Attachment attachment = slot.attachment;
|
||||||
if (attachment instanceof BoundingBoxAttachment) {
|
if (attachment instanceof BoundingBoxAttachment) {
|
||||||
BoundingBoxAttachment boundingBox = (BoundingBoxAttachment)attachment;
|
BoundingBoxAttachment boundingBox = (BoundingBoxAttachment)attachment;
|
||||||
boundingBoxes.add(boundingBox);
|
boundingBoxes.add(boundingBox);
|
||||||
|
|||||||
@ -51,7 +51,7 @@ public class SkeletonMeshRenderer extends SkeletonRenderer<PolygonSpriteBatch> {
|
|||||||
Array<Slot> drawOrder = skeleton.drawOrder;
|
Array<Slot> drawOrder = skeleton.drawOrder;
|
||||||
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
||||||
Slot slot = drawOrder.get(i);
|
Slot slot = drawOrder.get(i);
|
||||||
Attachment attachment = slot.getAttachment();
|
Attachment attachment = slot.attachment;
|
||||||
Texture texture = null;
|
Texture texture = null;
|
||||||
if (attachment instanceof RegionAttachment) {
|
if (attachment instanceof RegionAttachment) {
|
||||||
RegionAttachment region = (RegionAttachment)attachment;
|
RegionAttachment region = (RegionAttachment)attachment;
|
||||||
|
|||||||
@ -46,7 +46,7 @@ public class SkeletonRenderer<T extends Batch> {
|
|||||||
Array<Slot> drawOrder = skeleton.drawOrder;
|
Array<Slot> drawOrder = skeleton.drawOrder;
|
||||||
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
for (int i = 0, n = drawOrder.size; i < n; i++) {
|
||||||
Slot slot = drawOrder.get(i);
|
Slot slot = drawOrder.get(i);
|
||||||
Attachment attachment = slot.getAttachment();
|
Attachment attachment = slot.attachment;
|
||||||
if (attachment instanceof RegionAttachment) {
|
if (attachment instanceof RegionAttachment) {
|
||||||
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
||||||
float[] vertices = regionAttachment.updateWorldVertices(slot, premultipliedAlpha);
|
float[] vertices = regionAttachment.updateWorldVertices(slot, premultipliedAlpha);
|
||||||
|
|||||||
@ -104,7 +104,7 @@ public class SkeletonRendererDebug {
|
|||||||
Array<Slot> slots = skeleton.getSlots();
|
Array<Slot> slots = skeleton.getSlots();
|
||||||
for (int i = 0, n = slots.size; i < n; i++) {
|
for (int i = 0, n = slots.size; i < n; i++) {
|
||||||
Slot slot = slots.get(i);
|
Slot slot = slots.get(i);
|
||||||
Attachment attachment = slot.getAttachment();
|
Attachment attachment = slot.attachment;
|
||||||
if (attachment instanceof RegionAttachment) {
|
if (attachment instanceof RegionAttachment) {
|
||||||
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
RegionAttachment regionAttachment = (RegionAttachment)attachment;
|
||||||
float[] vertices = regionAttachment.updateWorldVertices(slot, false);
|
float[] vertices = regionAttachment.updateWorldVertices(slot, false);
|
||||||
@ -120,7 +120,7 @@ public class SkeletonRendererDebug {
|
|||||||
Array<Slot> slots = skeleton.getSlots();
|
Array<Slot> slots = skeleton.getSlots();
|
||||||
for (int i = 0, n = slots.size; i < n; i++) {
|
for (int i = 0, n = slots.size; i < n; i++) {
|
||||||
Slot slot = slots.get(i);
|
Slot slot = slots.get(i);
|
||||||
Attachment attachment = slot.getAttachment();
|
Attachment attachment = slot.attachment;
|
||||||
if (!(attachment instanceof MeshAttachment)) continue;
|
if (!(attachment instanceof MeshAttachment)) continue;
|
||||||
MeshAttachment mesh = (MeshAttachment)attachment;
|
MeshAttachment mesh = (MeshAttachment)attachment;
|
||||||
mesh.updateWorldVertices(slot, false);
|
mesh.updateWorldVertices(slot, false);
|
||||||
@ -169,7 +169,7 @@ public class SkeletonRendererDebug {
|
|||||||
Array<Slot> slots = skeleton.getSlots();
|
Array<Slot> slots = skeleton.getSlots();
|
||||||
for (int i = 0, n = slots.size; i < n; i++) {
|
for (int i = 0, n = slots.size; i < n; i++) {
|
||||||
Slot slot = slots.get(i);
|
Slot slot = slots.get(i);
|
||||||
Attachment attachment = slot.getAttachment();
|
Attachment attachment = slot.attachment;
|
||||||
if (!(attachment instanceof PathAttachment)) continue;
|
if (!(attachment instanceof PathAttachment)) continue;
|
||||||
PathAttachment path = (PathAttachment)attachment;
|
PathAttachment path = (PathAttachment)attachment;
|
||||||
int nn = path.getWorldVerticesLength();
|
int nn = path.getWorldVerticesLength();
|
||||||
|
|||||||
@ -101,7 +101,7 @@ public class Skin {
|
|||||||
for (Entry<Key, Attachment> entry : oldSkin.attachments.entries()) {
|
for (Entry<Key, Attachment> entry : oldSkin.attachments.entries()) {
|
||||||
int slotIndex = entry.key.slotIndex;
|
int slotIndex = entry.key.slotIndex;
|
||||||
Slot slot = skeleton.slots.get(slotIndex);
|
Slot slot = skeleton.slots.get(slotIndex);
|
||||||
if (slot.getAttachment() == entry.value) {
|
if (slot.attachment == entry.value) {
|
||||||
Attachment attachment = getAttachment(slotIndex, entry.key.name);
|
Attachment attachment = getAttachment(slotIndex, entry.key.name);
|
||||||
if (attachment != null) slot.setAttachment(attachment);
|
if (attachment != null) slot.setAttachment(attachment);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user