private IEnumerator WaitForSpacialItemGoToPacient(SpecialCompleteItem specialCompleteItem)
 {
     while (specialCompleteItem.specialItemObject.activeSelf)
     {
         yield return(null);
     }
     OpenVictoryCanvas();
 }
示例#2
0
 protected override void ExecuteAction(CharacterBehaviour character)
 {
     if (character.CheckIfSpecialIsActivated() && !specialItemIsUsed)
     {
         specialItemIsUsed = true;
         GameEvents.FSMEvents.StartInteraction.SafeInvoke(GameEnums.FSMInteractionEnum.ActivateItem);
         // wait form reach destination
         SpecialCompleteItem specialCompleteItem = character.specialCompleteItem.GetComponent <SpecialCompleteItem>();
         specialCompleteItem.GetComponent <Animator>().SetTrigger("GoToPatient");
         StartCoroutine(WaitForSpacialItemGoToPacient(specialCompleteItem));
     }
 }
示例#3
0
    private IEnumerator WaitForSpacialItemGoToPacient(SpecialCompleteItem specialCompleteItem)
    {
        while (specialCompleteItem.specialItemObject.activeSelf)
        {
            yield return(null);
        }

        // register finish tutorial on save file
        if (SaveManager.currentProgress != null)
        {
            SaveManager.currentProgress.completedTutorial = true;
            SaveManager.SaveProgressFile();
        }

        GameEvents.AudioEvents.TriggerSFX.SafeInvoke("Fanfare", false, false);
        SceneChanger.Instance.ChangeToScene("hospital");
    }