mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Added skeleton RGBA tint.
This commit is contained in:
parent
99ee8361e2
commit
59513b4afa
@ -134,7 +134,7 @@ function spine.Skeleton.new (skeletonData, group)
|
|||||||
image.yScale = -image.yScale
|
image.yScale = -image.yScale
|
||||||
image.rotation = -image.rotation
|
image.rotation = -image.rotation
|
||||||
end
|
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)
|
self.group:insert(image)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -102,7 +102,7 @@ function spine.Skeleton.new (skeletonData, group)
|
|||||||
yScale = -yScale
|
yScale = -yScale
|
||||||
rotation = -rotation
|
rotation = -rotation
|
||||||
end
|
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,
|
love.graphics.draw(image,
|
||||||
self.x + x,
|
self.x + x,
|
||||||
self.y - y,
|
self.y - y,
|
||||||
|
|||||||
@ -36,7 +36,8 @@ function Skeleton.new (skeletonData)
|
|||||||
bones = {},
|
bones = {},
|
||||||
slots = {},
|
slots = {},
|
||||||
slotsByName = {},
|
slotsByName = {},
|
||||||
drawOrder = {}
|
drawOrder = {},
|
||||||
|
r = 1, g = 1, b = 1, a = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function self:updateWorldTransform ()
|
function self:updateWorldTransform ()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user