IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/Blackboard/SampleCurve.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

27 lines
569 B
C#

using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
namespace NodeCanvas.Tasks.Actions
{
[Category("✫ Blackboard")]
public class SampleCurve : ActionTask
{
[RequiredField]
public BBParameter<AnimationCurve> curve;
[SliderField(0, 1)]
public BBParameter<float> sampleAt;
[BlackboardOnly]
public BBParameter<float> saveAs;
protected override void OnExecute() {
saveAs.value = curve.value.Evaluate(sampleAt.value);
EndAction();
}
}
}