Contents

init(componentClass:)

Initializes a component system to manage components of the specified class.

Declaration

init(componentClass cls: AnyClass)

Return Value

A new component system.

Discussion

Each GKComponentSystem object manages components of a specific GKComponent subclass, which you specify with the class parameter in this intializer. After initializing a component system, you may add components to it only if their type matches the system’s component class.

For more information, see GameplayKit Programming Guide.