colorize(withColorBlendFactor:duration:)
Creates an action that animates a sprite’s blend factor.
Declaration
class func colorize(withColorBlendFactor colorBlendFactor: CGFloat, duration sec: TimeInterval) -> SKActionParameters
- colorBlendFactor:
The new blend factor for the sprite.
- sec:
The duration of the animation.
Return Value
A new action object.
Discussion
This action can only be executed by an SKSpriteNode object. When the action executes, the sprite’s colorBlendFactor property animates to the new value.
This action is not reversible; the reverse of this action does nothing.
See Also
Animating a Node’s Texture
resize(byWidth:height:duration:)resize(toHeight:duration:)resize(toWidth:duration:)resize(toWidth:height:duration:)setTexture(_:)setTexture(_:resize:)animate(with:timePerFrame:)animate(with:timePerFrame:resize:restore:)setNormalTexture(_:)setNormalTexture(_:resize:)animate(withNormalTextures:timePerFrame:)animate(withNormalTextures:timePerFrame:resize:restore:)colorize(with:colorBlendFactor:duration:)