26 lines
672 B
C#
26 lines
672 B
C#
using Convention;
|
|
using Convention.WindowsUI.Variant;
|
|
using Demo.Attr;
|
|
using Dreamteck.Splines;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
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);
|
|
}
|
|
}
|
|
}
|