13 lines
249 B
GDScript3
13 lines
249 B
GDScript3
|
extends AnimationPlayer
|
||
|
|
||
|
var TARGET_FRAMERATE = 5.0
|
||
|
|
||
|
var time_buffer = 0.0
|
||
|
func _process(delta):
|
||
|
if GlobalCursorState.is_frozen:
|
||
|
return
|
||
|
time_buffer += delta
|
||
|
if time_buffer >= (1.0 / TARGET_FRAMERATE):
|
||
|
advance(time_buffer)
|
||
|
time_buffer = 0.0
|