15 lines
365 B
GDScript
15 lines
365 B
GDScript
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)
|
|
|
|
func frame_inc(_frame: int):
|
|
advance(delta)
|
|
|
|
func frames_change(start: int, end: int):
|
|
advance((end - start)*delta)
|