soundvision/UnityProject/Assets/Scripts/PdConnection/ScheduledAction.cs

28 lines
486 B
C#
Raw Normal View History

2019-12-06 21:21:24 +00:00
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_;
}
}