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

15 lines
306 B
GDScript3
Raw Permalink Normal View History

2018-07-25 07:36:19 +00:00
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