Files
fgj-26/Scripts/Enemies/EnemyMovement.cs
T
2026-01-31 23:25:02 +02:00

21 lines
414 B
C#

using Godot;
using System;
public partial class EnemyMovement : Node
{
[Export] private PathFollow2D _pathFollow2D;
[Export] private float _speed;
private double _time = 0;
public override void _EnterTree()
{
_pathFollow2D.ProgressRatio = 0;
}
public override void _Process(double delta)
{
_pathFollow2D.ProgressRatio += (float)delta * (_speed / 1000f);
}
}