更新至unity6并且更改Scriptable完成
This commit is contained in:
23
Assets/Scripts/MoreSpline/Updatement/SplinePointerObject.cs
Normal file
23
Assets/Scripts/MoreSpline/Updatement/SplinePointerObject.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user