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

27 lines
621 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
namespace NodeCanvas.Tasks.Conditions
{
[Name("Check Parameter Bool")]
[Category("Animator")]
public class MecanimCheckBool : ConditionTask<Animator>
{
[RequiredField]
public BBParameter<string> parameter;
public BBParameter<bool> value;
protected override string info {
get { return "Mec.Bool " + parameter.ToString() + " == " + value; }
}
protected override bool OnCheck() {
return agent.GetBool(parameter.value) == value.value;
}
}
}