26 lines
577 B
C#
26 lines
577 B
C#
using Convention;
|
|
using Demo.Attr;
|
|
using System;
|
|
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
namespace Demo.Game
|
|
{
|
|
/// <summary>
|
|
/// 天然被动跟随
|
|
/// </summary>
|
|
[Scriptable]
|
|
public class SplineRotation : BasicSplineJustFollow
|
|
{
|
|
public static SplineRotation Make()
|
|
{
|
|
return new GameObject().AddComponent<SplineRotation>();
|
|
}
|
|
|
|
protected override void UpdateData(float data)
|
|
{
|
|
UpdateTarget.transform.rotation = MySplineCore.MySplineComputer.Evaluate(data).rotation;
|
|
}
|
|
}
|
|
}
|