24 lines
638 B
C#
24 lines
638 B
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using Convention;
|
||
|
|
using Convention.WindowsUI.Variant;
|
||
|
|
using Dreamteck.Splines;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace Demo.Game
|
||
|
|
{
|
||
|
|
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);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|