21 lines
538 B
C#
21 lines
538 B
C#
using Demo.Game.Attr;
|
|
using UnityEngine;
|
|
|
|
namespace Demo.Game
|
|
{
|
|
[Scriptable]
|
|
public class SplinePointerObject : BasicSplineJustFollow
|
|
{
|
|
public static SplinePointerObject Make()
|
|
{
|
|
return new GameObject().AddComponent<SplinePointerObject>();
|
|
}
|
|
|
|
protected override void UpdateData(float data)
|
|
{
|
|
var sample = MySplineCore.MySplineComputer.Evaluate(data);
|
|
UpdateTarget.transform.SetPositionAndRotation(sample.position, sample.rotation);
|
|
}
|
|
}
|
|
}
|