goodnight_jellybean/godot/assets/CreatureAnimationPlayer.gd

13 lines
249 B
GDScript3
Raw Normal View History

2023-01-01 14:02:34 -07:00
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