Type Method

behaviorWithGoals:andWeights:

Creates a behavior with the specified goals and weights.

Declaration

+ (instancetype)behaviorWithGoals:(NSArray<GKGoal *> *)goals andWeights:(NSArray<NSNumber *> *)weights;

Parameters

goals

An array of goal objects.

weights

An array of numbers, each the weight to be applied to the goal at the corresponding index in the goals array.

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.

+ behaviorWithWeightedGoals:

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