Exemple #1
0
    public void UpdateDefault()
    {
        if (currentTask == null)
        {
            return;
        }

        Task.State _state = currentTask();

        if (_state == Task.State.Abort)
        {
            currentTask = null;
            TaskHandler.FinishedMultiTask(this, _wasSuccess: false);
        }
        else if (_state == Task.State.Done)
        {
            currentTask = null;

            if (tasks.Count > 0)
            {
                StartNextTask();
                return;
            }

            TaskHandler.FinishedMultiTask(this, _wasSuccess: true);
        }
    }