mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 14:54:53 +08:00
[libgdx] Removed Slot#attachmentName.
Decided lazy attachment look up was premature optimization.
This commit is contained in:
parent
be01e0aae3
commit
bc629cec11
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user