23 lines
533 B
C#
23 lines
533 B
C#
using Demo.Game.Attr;
|
|
using UnityEngine;
|
|
|
|
namespace Demo.Game
|
|
{
|
|
/// <summary>
|
|
/// 天然被动跟随
|
|
/// </summary>
|
|
[Scriptable]
|
|
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;
|
|
}
|
|
}
|
|
}
|