2025-11-25 10:52:39 +08:00
|
|
|
using Convention;
|
|
|
|
|
using Convention.WindowsUI.Variant;
|
2025-12-12 15:19:10 +08:00
|
|
|
using Demo.Attr;
|
2025-11-25 10:52:39 +08:00
|
|
|
using Dreamteck.Splines;
|
2025-12-12 15:19:10 +08:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2025-11-25 10:52:39 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Demo.Game
|
|
|
|
|
{
|
2025-12-12 15:19:10 +08:00
|
|
|
[Scriptable]
|
2025-11-25 10:52:39 +08:00
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|