subscript(_:)
Returns the goal at the specified index in the behavior’s list of goals.
Declaration
subscript(idx: Int) -> GKGoal { get }Parameters
- idx:
An index in the behavior’s list of goals; must be less than the value of the Goalcount property.
Return Value
The goal at the specified index.
Discussion
The order of goals in a behavior is undefined. However, you can use this method to enumerate all goals in a behavior.