Initializer

init(toReachTargetSpeed:)

Creates a goal whose effect is to accelerate or decelerate an agent until it reaches the specified speed.

Declaration

convenience init(toReachTargetSpeed targetSpeed: Float)

Parameters

targetSpeed

The speed for affected agents to reach.

Return Value

A new goal object.

See Also

Creating Goals for General Movement Behavior

init(toSeekAgent: GKAgent)

Creates a goal whose effect is to move an agent toward the current position of the specified other agent.

init(toFleeAgent: GKAgent)

Creates a goal whose effect is to move an agent away from the current position of the specified other agent.

init(toWander: Float)

Creates a goal whose effect is to make an agent wander aimlessly, moving forward and turning at random.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software