private IEnumerator HandleIt() { if (anim.GetCurrentAnimatorStateInfo(0).IsName("bubble_speaker")) { //Debug.Log("running"); } else { if (dialougeStarted == false) { //Debug.Log("ende"); dialouge.dialogBox = gameObject; dialouge.npcDialougeText = DialougeText; dialouge.npcIndex = 2; dialouge.SpeechbubbleAnimationsdelay = 0.6f; dialouge.StartCoroutine(dialouge.StartDialouge()); dialouge.SpeechbubbleAnimationsdelay = 2.0f; dialougeStarted = true; } else { if (dialouge.npcIndex < 5 && dialouge.continueDialouge == true) { dialouge.TriggerContinueDialogue(); } else { if (dialouge.npcIndex == 5 && speaker_dialouge_finished == false) { yield return(new WaitForSeconds(2.0f)); dialouge.finished = true; dialouge.TriggerContinueDialogue(); speaker_dialouge_finished = true; } } } if (speaker_dialouge_finished) { dialogBox.enabled = true; text.enabled = true; } } }
private IEnumerator HandleIt() { if (anim.GetCurrentAnimatorStateInfo(0).IsName("bubble")) { //Debug.Log("running"); } else { if (dialougeStarted == false) { //Debug.Log("ende"); dialouge.npcIndex = 0; dialouge.StartCoroutine(dialouge.StartDialouge()); dialougeStarted = true; } else { if (dialouge.npcIndex < 2 && dialouge.continueDialouge == true) { dialouge.TriggerContinueDialogue(); } else { if (dialouge.npcIndex == 2 && thinking_dialouge_finished == false) { yield return(new WaitForSeconds(2.0f)); dialouge.finished = true; dialouge.TriggerContinueDialogue(); thinking_dialouge_finished = true; dialougeStarted = false; } } } } }