Timescalable components

This commit is contained in:
Rendo 2025-07-08 00:05:23 +05:00
commit e527d1da44
11 changed files with 83 additions and 24 deletions

View file

@ -0,0 +1,17 @@
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);
}
}