Instance Method

initWithTextures:size:timePerFrame:

Initializes a new tile definition with an array of textures for animation.

Declaration

- (instancetype)initWithTextures:(NSArray<SKTexture *> *)textures size:(CGSize)size timePerFrame:(CGFloat)timePerFrame;

Parameters

textures

An array of textures to reference for the definition's size and content.

size

The size of the tile in points.

timePerFrame

The duration, in seconds, that each texture is displayed.

Return Value

A new tile definition.

See Also

Creating an Animated Tile