//[SerializeField] GameObject Player; void Start() { fadeInUI = gameObject.GetComponent <FadeInUI>(); fadeOutUI = gameObject.GetComponent <FadeOutUI>(); if (DebugMode) { Dialog = TestDialog; } //Player = GameObject.FindGameObjectWithTag("Player"); }
public void StartDialog(DialogsScriptableObject dialogScriptableObject) { //Player.GetComponent<PlayerBehavior>().enabled = false; StopAllCoroutines(); nextSentenceActive = true; DialogButton.SetActive(nextSentenceActive); Dialog = dialogScriptableObject; Debug.Log(Dialog.textDialog); fadeInUI.StartFadeingUI(); StartCoroutine(TypeSentence(Dialog.textDialog)); }
public void DisplayNextSentence() { if (Dialog.EndScene == true) { if (Dialog.nextSentences != null) { Dialog = Dialog.nextSentences; } EndDialog(); return; } else { Dialog = Dialog.nextSentences; StopAllCoroutines(); StartCoroutine(TypeSentence(Dialog.textDialog)); } }