Type Method

spriteNodeWithImageNamed:

Initializes a textured sprite using an image file.

Declaration

+ (instancetype)spriteNodeWithImageNamed:(NSString *)name;

Parameters

name

The name of an image file stored in the app bundle.

Return Value

A newly initialized sprite object.

See Also

Creating a Sprite from a Texture

- initWithTexture:

Initializes a textured sprite using an existing texture object.

- initWithTexture:color:size:

Initializes a colored and textured sprite using an existing texture object.

+ spriteNodeWithColor:size:

Initializes a colored sprite.

+ spriteNodeWithTexture:

Initializes a textured sprite using an existing texture object.

+ spriteNodeWithTexture:size:

Initializes a textured sprite using an existing texture object but with a specified size.

+ spriteNodeWithTexture:normalMap:

Initializes a textured sprite with a normal map to simulate 3D lighting.

texture

The texture used to draw the sprite.