Type Method

fadeOutWithDuration:

Creates an action that changes the alpha value of the node to 0.0.

Declaration

+ (SKAction *)fadeOutWithDuration:(NSTimeInterval)duration;

Parameters

sec

The duration of the animation.

Return Value

A new action object.

Discussion

When the action executes, the node’s alpha property animates from its current value to 0.0. This causes the node to disappear.

This action is reversible; the reverse is created as if the following code is executed:

[SKAction fadeInWithDuration: sec];

See Also

Animating the Transparency of a Node

+ fadeInWithDuration:

Creates an action that changes the alpha value of the node to 1.0.

+ fadeAlphaBy:duration:

Creates an action that adjusts the alpha value of a node by a relative value.

+ fadeAlphaTo:duration:

Creates an action that adjusts the alpha value of a node to a new value.