Exemplo n.º 1
0
    public void ExecuteAction(Action action,
                              Action onEnd,
                              Action onFail)
    {
        Task task = Task.current;

        if (task.isStarting)
        {
            action();
        }
        if (!model.InfoIsExecutingAction())
        {
            onEnd();
            task.Succeed();
        }
        if (model.InfoIsFlinch())
        {
            onFail();
            task.Fail();
        }
    }
Exemplo n.º 2
0
 public bool IsFlinch()
 {
     return(model.InfoIsFlinch());
 }