編輯

共用方式為


GKBehavior.FromGoals Method

Definition

Overloads

FromGoals(NSDictionary<GKGoal,NSNumber>)

Creates and returns a GKBehavior for a set of weighted goals.

FromGoals(GKGoal[])

Factory method to create a GKBehavior with the specified goals, each with a weight of 1.0.

FromGoals(GKGoal[], NSNumber[])

Factory method to create a GKBehavior with the specified goals and their corresponding weights.

FromGoals(NSDictionary<GKGoal,NSNumber>)

Creates and returns a GKBehavior for a set of weighted goals.

[Foundation.Export("behaviorWithWeightedGoals:")]
public static GameplayKit.GKBehavior FromGoals (Foundation.NSDictionary<GameplayKit.GKGoal,Foundation.NSNumber> weightedGoals);
static member FromGoals : Foundation.NSDictionary<GameplayKit.GKGoal, Foundation.NSNumber> -> GameplayKit.GKBehavior

Parameters

weightedGoals
NSDictionary<GKGoal,NSNumber>

Returns

Attributes

Applies to

FromGoals(GKGoal[])

Factory method to create a GKBehavior with the specified goals, each with a weight of 1.0.

[Foundation.Export("behaviorWithGoals:")]
public static GameplayKit.GKBehavior FromGoals (GameplayKit.GKGoal[] goals);
static member FromGoals : GameplayKit.GKGoal[] -> GameplayKit.GKBehavior

Parameters

goals
GKGoal[]

Returns

Attributes

Applies to

FromGoals(GKGoal[], NSNumber[])

Factory method to create a GKBehavior with the specified goals and their corresponding weights.

[Foundation.Export("behaviorWithGoals:andWeights:")]
public static GameplayKit.GKBehavior FromGoals (GameplayKit.GKGoal[] goals, Foundation.NSNumber[] weights);
static member FromGoals : GameplayKit.GKGoal[] * Foundation.NSNumber[] -> GameplayKit.GKBehavior

Parameters

goals
GKGoal[]
weights
NSNumber[]

Returns

Attributes

Applies to