public void closeDialog() { dialogBoxDisplay.SetActive(false); dialogLine = 0; if (currentDialog.disableDialogOnceComplete) { currentDialog = null; } }
public void InitiateDialog(DialogScr D) { currentDialog = D; //D.dialogStarted.Invoke(); currentSoundClip = currentDialog.howdyClip; dialogLine = 0; dialogBoxDisplay.SetActive(true); displayedText.text = currentDialog.dialog[dialogLine]; NPCSounds.clip = currentSoundClip; NPCSounds.Play(); dialogLine++; }
void OnTriggerExit(Collider other) { if (other.gameObject.layer == 17) { if (other.GetComponent <DialogScr>()) { currentDialog.hideOverhead(); dialogBoxDisplay.SetActive(false); dialogLine = 0; currentDialog = null; } } }
void OnTriggerEnter(Collider other) { if (other.gameObject.layer == 17) { if (other.GetComponent <DialogScr>()) { currentDialog = other.GetComponent <DialogScr>(); currentSoundClip = currentDialog.howdyClip; currentDialog.showOverhead(); } } }