IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Conditions/Animator/MecanimCheckInt.cs

31 lines
826 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
using NodeCanvas.Framework;
using ParadoxNotion;
using ParadoxNotion.Design;
using UnityEngine;
namespace NodeCanvas.Tasks.Conditions
{
[Name("Check Parameter Int")]
[Category("Animator")]
public class MecanimCheckInt : ConditionTask<Animator>
{
[RequiredField]
public BBParameter<string> parameter;
public CompareMethod comparison = CompareMethod.EqualTo;
public BBParameter<int> value;
protected override string info {
get
{
return "Mec.Int " + parameter.ToString() + OperationTools.GetCompareString(comparison) + value;
}
}
protected override bool OnCheck() {
return OperationTools.Compare((int)agent.GetInteger(parameter.value), (int)value.value, comparison);
}
}
}