소스 검색

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

badlogic 8 년 전
부모
커밋
755425d4be
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      spine-lua/Slot.lua

+ 2 - 3
spine-lua/Slot.lua

@@ -46,8 +46,7 @@ function Slot.new (data, bone)
 		darkColor = nil,
 		darkColor = nil,
 		attachment = nil,
 		attachment = nil,
 		attachmentTime = 0,
 		attachmentTime = 0,
-		attachmentVertices = {},
-		attachmentVerticesCount = 0
+		attachmentVertices = {}
 	}	
 	}	
 	setmetatable(self, Slot)
 	setmetatable(self, Slot)
 	
 	
@@ -62,7 +61,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)