ReactNegatively() public method

public ReactNegatively ( ) : void
return void
Beispiel #1
0
        public void OnLetterChoiceSelected(LetterChoiceController letterChoice)
        {
            HideLetterPicker();
            ShowLetterPicker(feedbackDuration + 0.75f);

            if (commonLetters.Exists(x => x.Id == letterChoice.letterData.Id))
            {
                letterChoice.State = LetterChoiceController.ChoiceState.CORRECT;
                //letterChoice.SpawnBalloon(true);
                GetConfiguration().Context.GetAudioManager().PlaySound(Sfx.LetterHappy);
                dropZone.AnimateCorrect();
                TutorialUI.MarkYes(correctChoiceIndicatorPosition, TutorialUI.MarkSize.Normal);
                MakeFriendsConfiguration.Instance.Context.GetAudioManager().PlaySound(Sfx.StampOK);

                if (!correctChoices.Exists(x => x.Id == letterChoice.letterData.Id))
                {
                    correctChoices.Add(letterChoice.letterData);
                }

                if (correctChoices.Count >= commonLetters.Count)
                {
                    EndRound(true);
                }
                else
                {
                    dropZone.ResetLetter(feedbackDuration);
                }
                antura.ReactPositively();
            }
            else
            {
                letterChoice.State = LetterChoiceController.ChoiceState.WRONG;
                //letterChoice.SpawnBalloon(false);
                GetConfiguration().Context.GetAudioManager().PlaySound(Sfx.LetterSad);
                dropZone.AnimateWrong();
                TutorialUI.MarkNo(correctChoiceIndicatorPosition, TutorialUI.MarkSize.Normal);
                MakeFriendsConfiguration.Instance.Context.GetAudioManager().PlaySound(Sfx.KO);
                dropZone.ResetLetter(feedbackDuration);
                incorrectChoices.Add(letterChoice.letterData);
                antura.ReactNegatively();
                if (!isTutorialRound)
                {
                    leftArea.MoveAwayAngrily();
                    rightArea.MoveAwayAngrily();
                    if (incorrectChoices.Count >= 3)
                    {
                        EndRound(false);
                    }
                }
                else
                {
                    leftArea.livingLetter.LookAngry();
                    rightArea.livingLetter.LookAngry();
                }
            }
        }