21 lines
494 B
C#
21 lines
494 B
C#
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace Demo.Game
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// 天然被动跟随
|
||
|
|
/// </summary>
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|