soundvision/UnityProject/Assets/Scripts/PdConnection/ScheduledAction.cs
2019-12-06 22:21:24 +01:00

28 lines
No EOL
486 B
C#

using System;
namespace cylvester
{
public class ScheduledAction
{
public ScheduledAction(Action action)
{
action_ = action;
}
public void Ready()
{
standBy_ = true;
}
public void Go()
{
if (!standBy_) return;
action_.Invoke();
standBy_ = false;
}
private bool standBy_;
private readonly Action action_;
}
}