private void CompleteTask() { todoTasks.Remove(inProgressTask); if (inProgressTask.Name == "Sleep") { DayController.EndDay(); } if (inProgressTask.MaskIdx != -1) { Masks[inProgressTask.MaskIdx].SetActive(true); if (!MasksForTomorrow.Contains(inProgressTask.MaskIdx)) { MasksForTomorrow.Add(inProgressTask.MaskIdx); } bool allMasksShowing = true; foreach (GameObject mask in Masks) { if (!mask.activeSelf) { allMasksShowing = false; } } if (allMasksShowing) { AllMask.SetActive(true); } } if (todoTasks.Count == 0) { hintTimer = 0; } UpdateTaskUI(); completionAction.Invoke(); completionAction = null; inProgressTask = null; }