shmodot/scripts/Railway.cs

35 lines
610 B
C#
Raw Normal View History

2022-08-04 22:20:29 +02:00
using Godot;
using System;
2022-08-12 01:16:38 +02:00
public class Railway : Node
2022-08-04 22:20:29 +02:00
{
2022-08-12 01:16:38 +02:00
private Path _path = null;
private Path Path
2022-08-04 22:20:29 +02:00
{
2022-08-12 01:16:38 +02:00
get
{
if (_path == null)
{
_path = GetNode<Path>("Path");
}
return _path;
}
2022-08-04 22:20:29 +02:00
}
2022-08-12 01:16:38 +02:00
public Curve3D Curve => Path.Curve;
2022-08-04 22:20:29 +02:00
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
}
public override void _Process(float delta)
{
2022-08-12 01:16:38 +02:00
}
public void AddPathFollower(PathFollow pathFollow)
{
Path.AddChild(pathFollow);
2022-08-04 22:20:29 +02:00
}
}