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