rj-action-library/Runtime/Time/ModulateTimeLineSpeed.cs

33 lines
534 B
C#
Raw Normal View History

2025-01-03 12:09:23 +00:00
using Godot;
namespace Rokojori
{
[GlobalClass ]
public partial class ModulateTimeLineSpeed : RJSequenceAction
{
[Export]
public RJTimeLine timeline;
[Export]
public AnimationCurve curve;
public override void _OnTrigger()
{
var tm = Unique<TimeLineManager>.Get();
if ( tm == null || timeline == null || curve == null )
{
return;
}
var id = DispatchStart();
tm.Modulate( timeline, curve, r => { DispatchEnd( id ); });
}
}
}