Class EntityReferenceCondition
- Namespace
- ElectricDrill.AstraRpgFramework.Conditions
- Assembly
- com.electricdrill.astra-rpg-framework.Runtime.dll
Condition that compares two entity slots resolved from the current EvaluationContext.
SameEntity and DifferentEntity use reference identity over resolved EntityCore instances and do not treat two missing entities as equal. Use the explicit null-check modes when absence is the desired predicate.
[Serializable]
[TypeSelectableMenu("Leaf/Entity")]
public class EntityReferenceCondition : Condition
- Inheritance
-
objectEntityReferenceCondition
Properties
Comparison
The comparison applied to the two resolved entity slots.
public EntityReferenceComparisonMode Comparison { get; }
Property Value
Left
The left entity slot resolved from the evaluation context.
public ConditionTarget Left { get; }
Property Value
Right
The right entity slot resolved from the evaluation context.
public ConditionTarget Right { get; }
Property Value
Methods
Create(ConditionTarget, ConditionTarget, EntityReferenceComparisonMode)
Creates an EntityReferenceCondition with the supplied comparison settings.
public static EntityReferenceCondition Create(ConditionTarget left, ConditionTarget right, EntityReferenceComparisonMode comparison)
Parameters
leftConditionTargetrightConditionTargetcomparisonEntityReferenceComparisonMode
Returns
Evaluate(EvaluationContext)
Evaluates this condition against the provided context.
public override bool Evaluate(EvaluationContext ctx)
Parameters
ctxEvaluationContextContextual data available to the condition (holder, performer, payload).
Returns
- bool
trueif the condition is satisfied; otherwisefalse.