12 lines
270 B
C#
12 lines
270 B
C#
using Godot;
|
|
|
|
public partial class FPSLabel : Label
|
|
{
|
|
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()}" : "";
|
|
}
|
|
}
|