Beispiel #1
0
        public void NextStep()
        {
            _dialogStep++;

            if (HandleDialogEnd())
            {
                return;
            }

            ActorController.SetActor(_dialog.Actors[_dialogStep]);
            AnimateText.ShowText(_dialog.DialogTexts[_dialogStep]);

            if (_dialogStep < _dialog.DialogAudio.Count)
            {
                _audioSource.Stop();
                _audioSource.PlayOneShot(_dialog.DialogAudio[_dialogStep]);
            }

            if (_dialogStep < _dialog.Events.Count)
            {
                EventUtil.ExecuteEvent(_dialog.Events[_dialogStep]);
            }
        }