using Godot;

namespace Newlon.Components;

public partial class TimeScalableAnimationTree : AnimationTree
{
	[Export] private Entity entity;
	public override void _Ready()
	{
		entity.OnLocalTimescaleChanged += OnTimescaleChanged;
	}

	private void OnTimescaleChanged(float timescale)
	{
		Set("parameters/TimeScale/scale", timescale);
	}
}
