void Update() { if (raydialogue) { if (pauseMenu.personScript.enabled) { press_dialogue.enabled = true; } else { press_dialogue.enabled = false; } if (Input.GetKeyDown(dialogueShow) && !IsDialShow) { DialoguePanel.SetActive(true); for (int n = 0; n < AssetHuman.Count; n++) { if (hit.collider.name == AssetHuman[n].NameHuman) { NumAsset = n; dialogueSetting = DialogueSettings.Load(AssetHuman[n].asset); } } i = AssetHuman[NumAsset].CurNode; IsDialShow = true; pauseMenu.personScript.enabled = false; text_interface.enabled = true; Cursor.visible = true; Cursor.lockState = CursorLockMode.None; if (dialogueSetting.node[i].IsSentence) { AnswerTable.SetActive(false); SkipButton.SetActive(true); StopAllCoroutines(); StartCoroutine(TextShowCorutine(dialogueSetting.node[i].text_dialogue)); } else { AnswerTable.SetActive(true); SkipButton.SetActive(false); createAnswers.ShowAnswer(); } } } else { press_dialogue.enabled = false; } if (SkipButton.activeSelf && Input.GetKeyDown(InpNextBtn)) { NextB(); } }
public void Load() { _asset = Resources.Load <TextAsset>(TEXT_ASSET_PATH); _dialogueSettings = DialogueSettings.Load(_asset); }