init(texture:color:size:)
Initializes a textured sprite in color using an existing texture object.
Declaration
init(texture: SKTexture?, color: UIColor, size: CGSize)init(texture: SKTexture?, color: NSColor, size: CGSize)Parameters
- texture:
A texture to apply to the sprite.
- color:
The color for the new sprite.
- size:
The size for the new sprite.
Return Value
A newly initialized sprite object.
Discussion
To colorize your texture, you also need to set the colorBlendFactor property of the sprite.