Creates an action that animates changes to a sprite’s texture.
- 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 duration, in seconds, that each texture is displayed.
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.