Files
FOU/Scenes/FPSLabel.cs
2024-11-03 14:56:07 +01:00

13 lines
287 B
C#

using Godot;
public partial class FPSLabel : Label
{
[Export]
public bool ShowFPS = true;
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta) {
Text = ShowFPS ? $"FPS: {Engine.GetFramesPerSecond()}" : "";
}
}