rokojori_action_library/Runtime/Time/SetTimeLineSpeed.cs

24 lines
379 B
C#

using Godot;
using Rokojori.Extensions;
namespace Rokojori
{
[Tool][GlobalClass ]
public partial class SetTimelineSpeed : Action
{
[Export]
public Timeline timeline;
[Export]
public float speed = 1;
protected override void _OnTrigger()
{
timeline = TimelineManager.Ensure( timeline );
timeline.runner.speed = speed;
}
}
}