/// <summary> /// Kết thúc trực tiếp 1 đoạn hội thoại, đồng thời deactivate DialogObject /// </summary> public void EndDialog() { this.dialogData.End(); this.currentDialogID = -1; VD.EndDialogue(); VD.OnNodeChange -= this.OnDialogChanged; OnDialogEnd?.Invoke(); this.State = DialogState.NotActive; this.animator.SetBool("dialogActive", false); }
void FinishDialogue() { UiManager.Instance.DialogUI.DisableRoots(); UiManager.Instance.DialogUI.gameObject.SetActive(false); // enable control _activeDialogue = null; ScenesManager.Instance.player.enableControl = true; OnDialogEnd?.Invoke(); }
public void Tick() { if (_accomplish || _currentDialog == null) { return; } if (_currentDialog.Tick() != EnumResult.Running) { _accomplish = true; if (OnDialogEnd != null) { OnDialogEnd.Invoke(_currentDialog._name); } } }
public void StartDialog(string dialogId, OnDialogEnd callback = null) { DialogBlock block = dm.LoadDialog(dialogId); DiglogEndEvent = callback; if (block == null) { Debug.Log("No Dialog Found"); mUIMgr.CloseCertainPanel(this); return; } model.frames = block.frames; model.dialogId = dialogId; frameIdx = 0; }