Contents

colorize(withColorBlendFactor:duration:)

Creates an action that animates a sprite’s blend factor.

Declaration

class func colorize(withColorBlendFactor colorBlendFactor: CGFloat, duration sec: TimeInterval) -> SKAction

Parameters

  • 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