init(goals:andWeights:)
Creates a behavior with the specified goals and weights.
Declaration
convenience init(goals: [GKGoal], andWeights weights: [NSNumber])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
goalsarray.
Return Value
A new behavior object. To assign a set of goals to an agent, use its behavior property.