Ejemplo n.º 1
0
        public IEnumerator ShowCO(CharacterDialogues dialogues, CharacterAnimation charAnimation)
        {
            foreach (var dialogue in dialogues.dialogues)
            {
                if (isOpen)
                {
                    yield return(StartCoroutine(HideCO()));
                }

                SfxManager.I.Play("sfx_pannello_testo");

                text.text = dialogue.text;
                charAnimation.SetEmotion(dialogue.emotion);

                panel.DOAnchorPosY(showPosition, transitionTime);
                yield return(new WaitForSeconds(transitionTime));

                isOpen = true;

                while (!click)
                {
                    yield return(null);
                }
                click = false;
            }

            Hide();

            GameManager.I.INTERACTING = false;
            CameraManager.I.Reset();
        }
Ejemplo n.º 2
0
        public IEnumerator ShowEmotion(Emotion emotion)
        {
            CharacterDialogues dialogues = successDialogues[(int)emotion];

            foreach (var dialogue in dialogues.dialogues)
            {
                if (isOpen)
                {
                    yield return(StartCoroutine(HideCO()));
                }

                SfxManager.I.Play("sfx_pannello_testo");

                text.text = dialogue.text;

                panel.DOAnchorPosY(showPosition, transitionTime);
                yield return(new WaitForSeconds(transitionTime));

                isOpen = true;

                while (!click)
                {
                    yield return(null);
                }
                click = false;
            }

            Hide();
        }
Ejemplo n.º 3
0
 public void Show(CharacterDialogues dialogues, CharacterAnimation charAnimation)
 {
     StartCoroutine(ShowCO(dialogues, charAnimation));
 }