20 lines
459 B
C#
20 lines
459 B
C#
using Demo.Game.Attr;
|
|
using UnityEngine;
|
|
|
|
namespace Demo.Game
|
|
{
|
|
[Scriptable]
|
|
public class SplineMovement : BasicSplineJustFollow
|
|
{
|
|
public static SplineMovement Make()
|
|
{
|
|
return new GameObject().AddComponent<SplineMovement>();
|
|
}
|
|
|
|
protected override void UpdateData(float data)
|
|
{
|
|
UpdateTarget.transform.position = MySplineCore.MySplineComputer.EvaluatePosition(data);
|
|
}
|
|
}
|
|
}
|