Instance Method

removeComponentForClass:

Removes the component of the specified class from the entity.

Declaration

- (void)removeComponentForClass:(Class)componentClass;

Parameters

componentClass

The GKComponent subclass for which to return a component instance.

Discussion

An entity’s components list always has no more than one instance of any component class. If the entity does not contain a component of the specified class, this method does nothing.

See Also

Managing an Entity’s List of Components

components

The entity’s list of components.

- componentForClass:

Returns the entity’s component for the specified component class.

- addComponent:

Adds a component to the entity.