2025-12-12 15:19:10 +08:00
|
|
|
using Demo.Attr;
|
2025-09-25 19:04:05 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Demo.Game
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 天然被动跟随
|
|
|
|
|
/// </summary>
|
2025-12-12 15:19:10 +08:00
|
|
|
[Scriptable]
|
2025-09-25 19:04:05 +08:00
|
|
|
public class SplineScaling : BasicSplineJustFollow
|
|
|
|
|
{
|
|
|
|
|
public static SplineScaling Make()
|
|
|
|
|
{
|
|
|
|
|
return new GameObject().AddComponent<SplineScaling>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void UpdateData(float data)
|
|
|
|
|
{
|
|
|
|
|
UpdateTarget.transform.localScale = Vector3.one * MySplineCore.MySplineComputer.Evaluate(data).size;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|