Instance Method

updateWithDeltaTime:

Performs any custom periodic actions defined by the component subclass.

Declaration

- (void)updateWithDeltaTime:(NSTimeInterval)seconds;

Parameters

seconds

The time step to use for any time-dependent actions performed by this method (typically, the elapsed time since the previous call to this method).

Discussion

Override this method to implement per-frame logic specific to your component class. GameplayKit calls this method when you call the updateWithDeltaTime: method of the entity owning a component, or when you call the updateWithDeltaTime: method of a GKComponentSystem object that manages all components of a specific GKComponent subclass. Typically, you call one of those methods in response to a per-frame game loop method such as update: (SpriteKit) or renderer:updateAtTime: (SceneKit).

See Also