Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
    void FinishDialogue()
    {
        UiManager.Instance.DialogUI.DisableRoots();
        UiManager.Instance.DialogUI.gameObject.SetActive(false);
        // enable control

        _activeDialogue = null;

        ScenesManager.Instance.player.enableControl = true;

        OnDialogEnd?.Invoke();
    }
Ejemplo n.º 3
0
 public void Tick()
 {
     if (_accomplish || _currentDialog == null)
     {
         return;
     }
     if (_currentDialog.Tick() != EnumResult.Running)
     {
         _accomplish = true;
         if (OnDialogEnd != null)
         {
             OnDialogEnd.Invoke(_currentDialog._name);
         }
     }
 }
Ejemplo n.º 4
0
    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;
    }