編集

次の方法で共有


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.

[Foundation.Export("assertFact:")]
public virtual void AssertFact (Foundation.NSObject fact);
abstract member AssertFact : Foundation.NSObject -> unit
override this.AssertFact : Foundation.NSObject -> unit

Parameters

fact
NSObject
Attributes

Applies to

AssertFact(NSObject, Single)

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

[Foundation.Export("assertFact:grade:")]
public virtual void AssertFact (Foundation.NSObject fact, float grade);
abstract member AssertFact : Foundation.NSObject * single -> unit
override this.AssertFact : Foundation.NSObject * single -> unit

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