rj-action-library/Runtime/Actions/Time/Delay.cs

32 lines
480 B
C#

using Godot;
namespace Rokojori
{
[GlobalClass]
public partial class Delay : SequenceAction
{
[Export]
public float duration;
[Export]
public TimeLine timeLine;
protected override void _OnTrigger()
{
var sequenceID = DispatchStart();
var eventID = TimeLineManager.ScheduleEventIn( timeLine, duration,
( tle ) =>
{
DispatchEnd( sequenceID );
}
);
}
}
}