I'm working using XCode 6, Sprite Kit and Swift and I have a node with this declaration:
var red = SKSpriteNode(imageNamed: "Rectangle")
and I want to change the opacity of the node, but I don't find how, except using a SKAction like FadeIn, FadeOut etc...
I tried changing red.colorBlendFactor but it's only change the opacity of a new color on the node, not the node's opacity...
Use SKNode
's alpha
property:
red.alpha = 0.5 // set red to 50% transparent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With