using NodeCanvas.Framework; using ParadoxNotion.Design; using UnityEngine; namespace NodeCanvas.Tasks.Actions { [Category("✫ Blackboard")] public class EvaluateCurve : ActionTask { [RequiredField] public BBParameter curve; public BBParameter from; public BBParameter to = 1; public BBParameter time = 1; [BlackboardOnly] public BBParameter saveAs; protected override void OnUpdate() { saveAs.value = curve.value.Evaluate(Mathf.Lerp(from.value, to.value, elapsedTime / time.value)); if ( elapsedTime > time.value ) EndAction(); } } }