Type Method

behaviorWithWeightedGoals:

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

Declaration

+ (instancetype)behaviorWithWeightedGoals:(NSDictionary<GKGoal *,NSNumber *> *)weightedGoals;

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

+ behaviorWithGoal:weight:

Creates a behavior with a single goal.

+ behaviorWithGoals:

Creates a behavior with the specified goals.

+ behaviorWithGoals:andWeights:

Creates a behavior with the specified goals and weights.