using Godot;
using yourareanaiceo;

public partial class CurrentTimeLine : Panel
{
    [Export]
    public float Speed = 15f;

    private bool _running;

    public override void _Process(double delta)
    {
        if (!_running)
            return;

        var pos = OffsetTransformPosition;
        pos.Y += Speed * delta.toFloat();

        OffsetTransformPosition = pos;
    }

    public void Start()
    {
        _running = true;
    }

    public void Stop()
    {
        _running = false;
        OffsetTransformPosition = Vector2.Zero;
    }
}
