39 lines
695 B
C#
39 lines
695 B
C#
|
|
using Godot;
|
|
|
|
|
|
namespace Rokojori
|
|
{
|
|
[GlobalClass]
|
|
public partial class Delay : RJSequenceAction
|
|
{
|
|
[Export]
|
|
public float duration;
|
|
|
|
[Export]
|
|
public string message;
|
|
|
|
[Export]
|
|
public RJTimeLine timeLine;
|
|
|
|
|
|
public override void _OnTrigger()
|
|
{
|
|
var sequenceID = DispatchStart();
|
|
|
|
var eventID = TimeLineScheduler.ScheduleEventIn( timeLine, duration,
|
|
( eventID ) =>
|
|
{
|
|
RJLog.Log( ">> delay ended", Time.GetTicksMsec(), sequenceID, eventID );
|
|
DispatchEnd( sequenceID );
|
|
|
|
}
|
|
);
|
|
|
|
RJLog.Log( ">> delay started", Time.GetTicksMsec(), sequenceID, eventID );
|
|
|
|
}
|
|
|
|
|
|
}
|
|
} |