Creates an action that animates changes to a sprite’s texture, possibly resizing the sprite.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
An array of textures to use when animating a sprite.
The amount of time, in seconds, that each texture is displayed.
true, the sprite is resized to match each new texture. If
false, the size of the sprite remains at a constant size.
When the action completes, the sprite’s texture is restored to the texture it had before the action completed. (If the resize parameter is
true, the sprite is resized to match the size of the original texture.)
When the action completes, the sprite’s texture remains set to the final texture in the array.
A new action object.
This action can only be executed by an
SKSprite object. When the action executes, the sprite’s
texture property animates through the array of textures. The sprite’s
texture property is changed to the next texture in the array. The action then pauses for the specified time before continuing. The action continues until it has finished animating through all of the textures in the array. The total duration of the action is the number of textures multiplied by the frame interval.
This action is reversible; the resulting action animates through the same textures from last to first.