One Logo Pool Ball
GameplayKit · IOS API REFERENCE

GKCompositeBehavior

class · SDK 27.1

class GKCompositeBehavior

Members (9)

init

init

TypeScript
static initBehaviors(behaviors: Array<GKBehavior>): GKCompositeBehavior
Swift declaration
convenience init(behaviors: [GKBehavior])
init

init

TypeScript
static initBehaviorsAndWeights(behaviors: Array<GKBehavior>, weights: Array<_Foundation_NSNumber>): GKCompositeBehavior
Swift declaration
convenience init(behaviors: [GKBehavior], andWeights weights: [NSNumber])
subscript

subscript

TypeScript
subscript(idx: number): GKBehavior
Swift declaration
subscript(idx: Int) -> GKBehavior { get }
subscript

subscript

TypeScript
subscript78642(behavior: GKBehavior): _Foundation_NSNumber
Swift declaration
subscript(behavior: GKBehavior) -> NSNumber { get set }
method

removeAllBehaviors

TypeScript
removeAllBehaviors(): void
Swift declaration
func removeAllBehaviors()
method

remove

TypeScript
remove(behavior: GKBehavior): void
Swift declaration
func remove(_ behavior: GKBehavior)
method

setWeight

TypeScript
setWeight(weight: number, behavior: GKBehavior): void
Swift declaration
func setWeight(_ weight: Float, for behavior: GKBehavior)
method

weight

TypeScript
weight(behavior: GKBehavior): number
Swift declaration
func weight(for behavior: GKBehavior) -> Float
get

behaviorCount

TypeScript
get behaviorCount(): number
Swift declaration
var behaviorCount: Int { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

GKCompositeBehavior.init()

inherited init: cannot prove legal (class declares 2 custom initializers)

All GameplayKit types →