added simple ui
This commit is contained in:
11
Scenes/FPSLabel.cs
Normal file
11
Scenes/FPSLabel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
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()}" : "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user