Contents

init(weightedGoals:)

Creates a behavior with the specified mapping of goals to their weights.

Declaration

convenience init(weightedGoals: [GKGoal : NSNumber])

Parameters

  • weightedGoals:

    A dictionary whose keys are goal objects, where each value is the weight to be applied to the corresponding goal’s influence on an agent’s speed and direction.

Return Value

A new behavior object. To assign a set of goals to an agent, use its behavior property.

See Also

Creating a Behavior