private void OnCharIsFound(TargetBoard targetBoard)
        {
            _foundCharCount++;

            if (_foundCharCount == TargetBoardField.Word.Length)
            {
                _foundCharCount = 0;
                StagePassedSignal.Dispatch();
            }
        }
示例#2
0
        private void CharIsFound()
        {
            ResetDoingNothingCoroutine();

            StagePassedSignal.Dispatch();

            MainView.DespawnLastGroup();

            ChangeCharacterEmotionSignal.Dispatch(CharacterEmotionType.Delight);
        }
        private void OnNewItemDetected(int scrollIndex, string syllable)
        {
            syllable = syllable.ToUpper();

            if (_scrollSyllableDict.ContainsKey(scrollIndex))
            {
                _scrollSyllableDict[scrollIndex] = syllable;
            }
            else
            {
                _scrollSyllableDict.Add(scrollIndex, syllable);
            }

            var isStagePassed = true;

            for (var i = 0; i < _syllableList.Count; i++)
            {
                if (!_scrollSyllableDict.ContainsKey(i))
                {
                    ChangeCharacterEmotionSignal.Dispatch(CharacterEmotionType.Denial);

                    return;
                }

                isStagePassed = isStagePassed && _syllableList[i].Equals(_scrollSyllableDict[i]);
            }

            if (isStagePassed)
            {
                StagePassedSignal.Dispatch();
                ChangeCharacterEmotionSignal.Dispatch(CharacterEmotionType.Delight);
            }
            else
            {
                ChangeCharacterEmotionSignal.Dispatch(CharacterEmotionType.Denial);
            }
        }
示例#4
0
        protected override void UpdateListeners(bool toAdd)
        {
            base.UpdateListeners(toAdd);

            FindingExpression.dispatcher.UpdateListener(toAdd, FindingExpression.EventType.ExpressionFound, () => StagePassedSignal.Dispatch());
        }
示例#5
0
        private void OnFieldPassed()
        {
            StagePassedSignal.Dispatch();

            ChangeCharacterEmotionSignal.Dispatch(CharacterEmotionType.Delight);
        }