13 lines
287 B
C#
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()}" : "";
|
|
}
|
|
}
|