[libgdx] Removed Slot#attachmentName.

Decided lazy attachment look up was premature optimization.
This commit is contained in:
NathanSweet 2016-08-05 01:31:01 +02:00
parent be01e0aae3
commit bc629cec11

View File

@ -39,10 +39,9 @@ public class Slot {
final SlotData data;
final Bone bone;
final Color color;
private Attachment attachment;
Attachment attachment;
private float attachmentTime;
private FloatArray attachmentVertices = new FloatArray();
String attachmentName;
public Slot (SlotData data, Bone bone) {
if (data == null) throw new IllegalArgumentException("data cannot be null.");
@ -82,10 +81,6 @@ public class Slot {
/** @return May be null. */
public Attachment getAttachment () {
if (attachmentName != null) {
attachment = bone.skeleton.getAttachment(data.index, attachmentName);
attachmentName = null;
}
return attachment;
}