rokojori_action_library/Runtime/Time/SetTimeLineSpeed.cs

24 lines
379 B
C#
Raw Normal View History

2025-01-03 12:09:23 +00:00
using Godot;
2026-05-22 12:25:02 +00:00
using Rokojori.Extensions;
2025-01-03 12:09:23 +00:00
namespace Rokojori
{
[Tool][GlobalClass ]
2026-05-22 12:25:02 +00:00
public partial class SetTimelineSpeed : Action
2025-01-03 12:09:23 +00:00
{
[Export]
2026-05-22 12:25:02 +00:00
public Timeline timeline;
2025-01-03 12:09:23 +00:00
[Export]
public float speed = 1;
2025-01-08 18:46:17 +00:00
protected override void _OnTrigger()
2025-01-19 20:35:51 +00:00
{
2026-05-22 12:25:02 +00:00
timeline = TimelineManager.Ensure( timeline );
2025-01-19 20:35:51 +00:00
timeline.runner.speed = speed;
2025-01-03 12:09:23 +00:00
}
}
}