14 lines
306 B
GDScript
14 lines
306 B
GDScript
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
|