瀏覽代碼

[lua] Fixed bug in Slot, attachment vertices didn't get cleared upon Slot:setAttachment call

badlogic 8 年之前
父節點
當前提交
7e2bd632ea
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      spine-lua/Slot.lua

+ 2 - 3
spine-lua/Slot.lua

@@ -45,8 +45,7 @@ function Slot.new (data, bone)
 		color = Color.newWith(1, 1, 1, 1),
 		color = Color.newWith(1, 1, 1, 1),
 		attachment = nil,
 		attachment = nil,
 		attachmentTime = 0,
 		attachmentTime = 0,
-		attachmentVertices = {},
-		attachmentVerticesCount = 0
+		attachmentVertices = {}		
 	}
 	}
 	setmetatable(self, Slot)
 	setmetatable(self, Slot)
 
 
@@ -59,7 +58,7 @@ function Slot:setAttachment (attachment)
 	if self.attachment == attachment then return end
 	if self.attachment == attachment then return end
 	self.attachment = attachment
 	self.attachment = attachment
 	self.attachmentTime = self.bone.skeleton.time
 	self.attachmentTime = self.bone.skeleton.time
-	self.attachmentVerticesCount = 0
+	self.attachmentVertices = {}
 end
 end
 
 
 function Slot:setAttachmentTime (time)
 function Slot:setAttachmentTime (time)