Pārlūkot izejas kodu

Added skeleton RGBA tint.

NathanSweet 12 gadi atpakaļ
vecāks
revīzija
59513b4afa

+ 1 - 1
spine-corona/spine-corona/spine.lua

@@ -134,7 +134,7 @@ function spine.Skeleton.new (skeletonData, group)
 						image.yScale = -image.yScale
 						image.rotation = -image.rotation
 					end
-					image:setFillColor(slot.r, slot.g, slot.b, slot.a)
+					image:setFillColor(self.r * slot.r, self.g * slot.g, self.b * slot.b, self.a * slot.a)
 					self.group:insert(image)
 				end
 			end

+ 1 - 1
spine-love/spine-love/spine.lua

@@ -102,7 +102,7 @@ function spine.Skeleton.new (skeletonData, group)
 						yScale = -yScale
 						rotation = -rotation
 					end
-					love.graphics.setColor(slot.r, slot.g, slot.b, slot.a)
+					love.graphics.setColor(self.r * slot.r, self.g * slot.g, self.b * slot.b, self.a * slot.a)
 					love.graphics.draw(image, 
 						self.x + x, 
 						self.y - y, 

+ 2 - 1
spine-lua/Skeleton.lua

@@ -36,7 +36,8 @@ function Skeleton.new (skeletonData)
 		bones = {},
 		slots = {},
 		slotsByName = {},
-		drawOrder = {}
+		drawOrder = {},
+		r = 1, g = 1, b = 1, a = 1
 	}
 
 	function self:updateWorldTransform ()