public static void Create(float perTime, System.Action action, CancellationToken cancellationToken) { Func <bool> disableReason = () => cancellationToken.IsCancellationRequested; var actionPerTime = new ActionPerTimeWithDisable(perTime, action, disableReason); TimeActionManager.Instance.Add(actionPerTime); }
public static void Create(float perTime, System.Action action, System.Func <bool> disableReason) { var actionPerTime = new ActionPerTimeWithDisable(perTime, action, disableReason); TimeActionManager.Instance.Add(actionPerTime); }