Beispiel #1
0
        private void Update()
        {
            if (!_isStarted)
            {
                return;
            }

            if (_goNext && _vnMainQueue.Count > 0)
            {
                _currentCommand = _vnMainQueue.Dequeue();
                Debug.Log("current tag : " + GetCurrentCommand()._tag + ", " + GetCurrentCommand()._command);
                if (_currentCommand._tag == CommandTag.Text ||
                    _currentCommand._tag == CommandTag.Menu)
                {
                    _goNext = false;
                }
                else
                {
                    StartCommand();
                }
            }
            else if (_vnMainQueue.Count == 0)
            {
                _isStarted = false;
                _goNext    = false;
                EndStory();
            }
        }
Beispiel #2
0
        public void PopCommandSet(string labelName)
        {
            var tmp = new Queue <VNCommand>(_vnMainQueue);

            _vnMainQueue = _vnCommandSet[labelName];

            foreach (var item in tmp)
            {
                _vnMainQueue.Enqueue(item);
                Debug.Log(item._tag + " : " + item._command);
            }

            GoNext();
            _currentCommand = _vnMainQueue.Dequeue();
            VisualNovelManager.Instance.GoNextLine();
        }
 public void Init(VNCommand command)
 {
     _command = command;
     transform.Find("Text").GetComponent <Text>().text = _command._command;
 }
 public void ShowInfoBox(VNCommand command)
 {
     _infoPanel.gameObject.SetActive(true);
     _infoPanel.Init(command);
 }