public void ConfirmEnd(CarryableObject co) { if (co == null) { return; } AudioManager.PlayConfirmedObjectSound(); Destroy(co.gameObject); finishedObjects++; if (finishedObjects == currentGoal) { if (DayTimer.Instance.DayNewTasksEnd > DayTimer.Instance.elapsedTime) { currentGoal += levelData.AdditionalObjects; AudioManager.Instance.SwitchMusic(AudioManager.MusicMode.Heavy); } else { DayTimer.Instance.DayHasEnded(); dialogReader.Read(winDialog, ActionsRunner.RunFunctionAsEnumerator(GameManager.GoToNextScene), false); } } GoalInformations.UpdateAll(); }
public void IncreaseGoal() { currentGoal += levelData.AdditionalObjects; GoalInformations.UpdateAll(); }