Instance Method

initWithTextures:normalTextures:size:timePerFrame:

Initializes a new tile definition with arrays of textures and normal textures for animation.

Declaration

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

Parameters

textures

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

normalTextures

An array of textures to reference for generating normals to simulate 3D lighting.

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