Exemple #1
0
    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();
    }
Exemple #2
0
 public void IncreaseGoal()
 {
     currentGoal += levelData.AdditionalObjects;
     GoalInformations.UpdateAll();
 }