first commit

This commit is contained in:
Chris
2025-03-12 14:22:16 -04:00
commit 0ad0c01249
1999 changed files with 189708 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using UnityEngine;
using NodeCanvas.Framework;
using ParadoxNotion;
using ParadoxNotion.Design;
namespace NodeCanvas.Tasks.Actions
{
[Category("GameObject")]
[Description("Checks the current speed of the agent against a value based on it's Rigidbody velocity")]
public class CheckSpeed : ConditionTask<Rigidbody>
{
public CompareMethod checkType = CompareMethod.EqualTo;
public BBParameter<float> value;
[SliderField(0, 0.1f)]
public float differenceThreshold = 0.05f;
protected override string info {
get { return "Speed" + OperationTools.GetCompareString(checkType) + value; }
}
protected override bool OnCheck() {
var speed = agent.linearVelocity.magnitude;
return OperationTools.Compare((float)speed, (float)value.value, checkType, differenceThreshold);
}
}
}