test-client-godot/gui_scene/GUI/Help/FPS.gd

15 lines
306 B
GDScript3
Raw Normal View History

extends Label
# class member variables go here, for example:
# var a = 2
# var b = "textvar"
const TIMER_DELTA = 1
onready var timer = TIMER_DELTA
func _process(delta):
if timer >= TIMER_DELTA:
self.set_text("FPS: " + str(int( 60/delta )) )
timer = 0
else:
timer += delta