using System; using System.Collections; using Convention; using UnityEngine; namespace Demo.Game { public abstract class BasicSplineJustFollow : Updatement { public SplineCore MySplineCore; protected override float Lerp(float begin, float end, float t) { return Mathf.Lerp(begin, end, t); } protected override abstract void UpdateData(float data); public override IEnumerator UnloadScript() { MySplineCore = null; yield return base.UnloadScript(); } /// /// 新增 /// /// 插值时间 /// /// 可取值为30种缓动曲线 [Convention.RScript.Variable.Attr.Method] public void Add(float time, float value, MathExtension.EaseCurveType curveType) { ManualAddEntry(time, value, curveType); } /// /// 绑定到样条线 /// /// 脚本位置 [Convention.RScript.Variable.Attr.Method] public void Load(SplineCore splineCore) { MySplineCore = splineCore; } } }