21 lines
414 B
C#
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);
|
|
}
|
|
}
|