Instance Property

delegate

An object that prepares for or responds to updates in the agent simulation.

Declaration

@property(nonatomic, weak) id<GKAgentDelegate> delegate;

Discussion

When you call the agent’s updateWithDeltaTime: method (directly or through an entity or component system), the agent sends messages to its delegate before and after evaluating its goals and updating its position and direction to match. You can use the methods in the GKAgentDelegate protocol to update the visual representation of an agent, or to change the agent’s position and direction based on external influences such as a SpriteKit or SceneKit physics simulation.