internal void Update() { if (IsDoingAnyTask) { if (!currentTask.IsFinished) { currentTask.Update(); } } else if (HasQueuedTasks) { SetCurrentTask(tasksQueue.Dequeue()); } }