Instance Method

initWithNode:

Initializes a component to manage the specified SpriteKit node.

Declaration

- (instancetype)initWithNode:(SKNode *)node;

Parameters

node

The SpriteKit node to be managed by the component.

Return Value

A new SpriteKit component.

Discussion

When you add this component to a GKEntity object, the component automatically sets the entity property of its SpriteKit node to point to that entity.

See Also

Creating a SpriteKit Component

+ componentWithNode:

Creates a component to manage the specified SpriteKit node.