hurrmmm/godot/animation_tree.gd

15 lines
365 B
GDScript3
Raw Normal View History

2023-11-12 02:59:43 -07:00
extends AnimationTree
var delta := 1.0 / float(Engine.physics_ticks_per_second)
func _ready():
TAS_System.FrameIncremented.connect(frame_inc)
TAS_System.FramesAdvanced.connect(frames_change)
TAS_System.FramesRegressed.connect(frames_change)
2023-11-12 03:17:46 -07:00
func frame_inc(_frame: int):
2023-11-12 02:59:43 -07:00
advance(delta)
func frames_change(start: int, end: int):
advance((end - start)*delta)