using Godot;
using Rokojori;

[GlobalClass]
public partial class FPSCounter : Node
{ 
  [Export]
  public UIText text;

  [Export]
  public FrameSmoothing fpsSmoother = new FrameSmoothing();


  public override void _Process( double delta )
  {
    var fps = (float)(1.0 / delta );
    var smoothedFPS = fpsSmoother.Smooth( fps, (float) delta );

    text.Text = RegexUtility._FFF( smoothedFPS );
  }
}
