Files
factory-game/source/Scripts/DebugScreen.cs
2026-03-01 08:32:24 +03:00

20 lines
466 B
C#

using Godot;
public partial class DebugScreen : Control {
public static DebugScreen? Instance { get; private set; }
[Export]
public RichTextLabel? Text { get; set; }
private string layout = string.Empty;
public override void _Ready() {
layout = Text!.Text;
Instance = this;
}
public override void _Process(double delta) {
var text = layout;
Text!.Text = layout.Replace("{FPS}", Engine.GetFramesPerSecond().ToString());
base._Process(delta);
}
}