25 lines
572 B
C#
25 lines
572 B
C#
using Godot;
|
|
|
|
public partial class Path : Path3D
|
|
{
|
|
public PathFollow3D PathFollow { get; private set; }
|
|
public Marker3D Target { get; private set; }
|
|
|
|
public override void _Ready()
|
|
{
|
|
PathFollow = GetNode<PathFollow3D>("PathFollow");
|
|
Target = GetNode<Marker3D>("PathFollow/Target");
|
|
}
|
|
|
|
public void Setup(Transform3D globalTransform, Curve3D curve)
|
|
{
|
|
SetGlobalTransform(globalTransform);
|
|
SetCurve(curve);
|
|
PathFollow.ProgressRatio = 0;
|
|
}
|
|
|
|
public void Teardown()
|
|
{
|
|
QueueFree();
|
|
}
|
|
} |