Läs på engelska Redigera

Dela via


GKRuleSystem.AssertFact Method

Definition

Overloads

AssertFact(NSObject)

Adds the fact to the system's knowledge-base, with a grade of 1.0.

AssertFact(NSObject, Single)

Adds the fact to the system's knowledge-base, increasing it's truth-value by grade.

AssertFact(NSObject)

Adds the fact to the system's knowledge-base, with a grade of 1.0.

C#
[Foundation.Export("assertFact:")]
public virtual void AssertFact(Foundation.NSObject fact);

Parameters

fact
NSObject
Attributes

Applies to

Xamarin iOS SDK 12
Produkt Versioner
Xamarin iOS SDK 12

AssertFact(NSObject, Single)

Adds the fact to the system's knowledge-base, increasing it's truth-value by grade.

C#
[Foundation.Export("assertFact:grade:")]
public virtual void AssertFact(Foundation.NSObject fact, float grade);

Parameters

fact
NSObject
grade
Single

The amount by which to change the truth grade of the fact.

Attributes

Remarks

If the truth grade of a fact goes to 0.0 or below, it is removed from the Facts collection.

Note that this process adds grade to the internally-stored grade of the fact. To set an absolute value, developers must first call M:GameplayKit.GKRuleSystem.RetractFact(NSObject) to erase the current internal belief in the fact.

Applies to

Xamarin iOS SDK 12
Produkt Versioner
Xamarin iOS SDK 12