IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Conditions/Blackboard/CheckVariable.cs

25 lines
674 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
using NodeCanvas.Framework;
using ParadoxNotion;
using ParadoxNotion.Design;
namespace NodeCanvas.Tasks.Conditions
{
[Category("✫ Blackboard")]
[Description("It's best to use the respective Condition for a type if existant since they support operations as well")]
public class CheckVariable<T> : ConditionTask
{
[BlackboardOnly]
public BBParameter<T> valueA;
public BBParameter<T> valueB;
protected override string info {
get { return valueA + " == " + valueB; }
}
protected override bool OnCheck() {
return ObjectUtils.AnyEquals(valueA.value, valueB.value);
}
}
}