Exemplo n.º 1
0
 public void StartDialog(DialogEvent _de)
 {
     Debug.Log("Start Dialog");
     _de.StartThis();
     currentDialog = _de;
     parts         = _de.parts;
     //events.Remove(_de);
     GameManager.Instance.Pause();
     //window.SetActive(true);
     animator.SetBool("active", true);
     idx    = -1;
     active = true;
     if (parts.Count >= 1)
     {
         AudioManager.Instance.PlaySound("communication");
     }
     Next();
 }
Exemplo n.º 2
0
        // Update is called once per frame
        void Update()
        {
            if (!inited)
            {
                return;
            }

            if (!active)
            {
                for (int i = 0; i < events.Count; i++)
                {
                    DialogEvent ev = events[i];
                    if (!ev.isDone() && ev.shouldTrigger())
                    {
                        StartDialog(ev);
                        break;
                    }
                }
            }
        }