Exemplo n.º 1
0
        private IEnumerator ShowWinSequence(LetterController correctLetterCntrl)
        {
            correctLetterCntrl.ShowVictoryRays();

            yield return(new WaitForSeconds(0.33f));

            correctLetterCntrl.Vanish();
            correctLetterCntrl.Reset();

            yield return(new WaitForSeconds(0.7f));

            SayQuestion();

            correctLetterCntrl.SetMotionVariation(LetterController.MotionVariation.Idle);
            correctLetterCntrl.SetPropVariation(LetterController.PropVariation.Nothing);
            correctLetterCntrl.MoveTo(0, 13.5f, -33f);
            correctLetterCntrl.transform.rotation = Quaternion.Euler(-Camera.main.transform.rotation.eulerAngles.x, 180, 0);
            correctLetterCntrl.shadow.SetActive(false);

            if (ThrowBallsConfiguration.Instance.Variation == ThrowBallsVariation.BuildWord)
            {
                correctLetterCntrl.SetLetter(question);
            }

            correctLetterCntrl.Show();
            correctLetterCntrl.letterObjectView.DoHorray();

            game.Context.GetAudioManager().PlaySound(Sfx.Win);

            yield return(new WaitForSeconds(3f));

            correctLetterCntrl.HideVictoryRays();

            OnRoundConcluded();
        }
Exemplo n.º 2
0
        private void UpdateLettersForLettersInWord(LetterController correctLetterCntrl)
        {
            correctLetterCntrl.Vanish();
            correctLetterCntrl.Reset();

            ILivingLetterData newCorrectLetter = currentLettersForLettersInWord[currentLettersForLettersInWord.Count - numLettersRemaining];

            for (int i = currentLettersForLettersInWord.Count - 1; i >= 0; i--)
            {
                if (letterControllers[i].GetLetter().Id == newCorrectLetter.Id && letterPool[i].activeSelf)
                {
                    letterPool[i].tag = Constants.CORRECT_LETTER_TAG;
                    tutorialTarget    = letterPool[i];
                }
                else
                {
                    letterPool[i].tag = Constants.WRONG_LETTER_TAG;
                }
            }
        }