Пример #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();
        }
    }
Пример #2
0
 public bool IsFlinch()
 {
     return(model.InfoIsFlinch());
 }