init(textures:normalTextures:size:timePerFrame:)
Initializes a new tile definition with arrays of textures and normal textures for animation.
Declaration
init(textures: [SKTexture], normalTextures: [SKTexture], size: CGSize, timePerFrame: CGFloat)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.