예제 #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();
        }
예제 #2
0
        private void ConfigureLetterPropAndMotionVariation(LetterController letterController, LetterAnimationMode mode)
        {
            if (IsTutorialRound())
            {
                letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                letterController.SetPropVariation(LetterController.PropVariation.Nothing);
                return;
            }

            switch (mode)
            {
            case LetterAnimationMode.IdleGround:
                letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                letterController.SetPropVariation(LetterController.PropVariation.Nothing);
                break;

            case LetterAnimationMode.JumpGround:
                letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
                letterController.SetPropVariation(LetterController.PropVariation.Nothing);
                break;

            case LetterAnimationMode.IdleCrate:
                letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                letterController.SetPropVariation(LetterController.PropVariation.StaticPileOfCrates);
                break;

            case LetterAnimationMode.JumpCrate:
                letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
                letterController.SetPropVariation(LetterController.PropVariation.StaticPileOfCrates);
                break;

            case LetterAnimationMode.IdleSwerving:
                letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                letterController.SetPropVariation(LetterController.PropVariation.SwervingPileOfCrates);
                break;

            case LetterAnimationMode.JumpSwerving:
                letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
                letterController.SetPropVariation(LetterController.PropVariation.SwervingPileOfCrates);
                break;

            case LetterAnimationMode.Bush:
                letterController.SetMotionVariation(LetterController.MotionVariation.Popping);
                letterController.SetPropVariation(LetterController.PropVariation.Bush);
                break;
            }

            /*
             * if (game.Difficulty <= MiniGameController.VERY_EASY)
             * {
             *  letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
             *  letterController.SetPropVariation(LetterController.PropVariation.Nothing);
             * }
             * else if (game.Difficulty <= MiniGameController.EASY)
             * {
             *  if (game.CurrentScore < 2)
             *  {
             *      letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
             *      letterController.SetPropVariation(LetterController.PropVariation.Nothing);
             *  }
             *  else
             *  {
             *      letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
             *      letterController.SetPropVariation(LetterController.PropVariation.Nothing);
             *  }
             * }
             * else if (game.Difficulty <= MiniGameController.NORMAL)
             * {
             *  if (game.CurrentScore < 1)
             *  {
             *      letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
             *      letterController.SetPropVariation(LetterController.PropVariation.Nothing);
             *  }
             *  else if (game.CurrentScore < 3)
             *  {
             *      letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
             *      letterController.SetPropVariation(LetterController.PropVariation.StaticPileOfCrates);
             *  }
             *  else
             *  {
             *      letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
             *      letterController.SetPropVariation(LetterController.PropVariation.StaticPileOfCrates);
             *  }
             * }
             * else if (game.Difficulty <= MiniGameController.HARD)
             * {
             *  if (roundNumber < 4)
             *  {
             *      if (Random.value <= 0.5f)
             *      {
             *          letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
             *          letterController.SetPropVariation(LetterController.PropVariation.StaticPileOfCrates);
             *      }
             *      else
             *      {
             *          letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
             *          letterController.SetPropVariation(LetterController.PropVariation.SwervingPileOfCrates);
             *      }
             *  }
             *  else
             *  {
             *      if (Random.value <= 0.6f)
             *      {
             *          letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
             *          letterController.SetPropVariation(LetterController.PropVariation.SwervingPileOfCrates);
             *      }
             *      else
             *      {
             *          letterController.SetMotionVariation(LetterController.MotionVariation.Popping);
             *          letterController.SetPropVariation(LetterController.PropVariation.Bush);
             *      }
             *  }
             * }
             * else if (game.Difficulty <= MiniGameController.VERY_HARD)
             * {
             *  if (Random.value <= 0.4f)
             *  {
             *      letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
             *      letterController.SetPropVariation(LetterController.PropVariation.SwervingPileOfCrates);
             *  }
             *  else
             *  {
             *      letterController.SetMotionVariation(LetterController.MotionVariation.Popping);
             *      letterController.SetPropVariation(LetterController.PropVariation.Bush);
             *  }
             * }*/
        }
예제 #3
0
        private void ConfigureLetterPropAndMotionVariation(LetterController letterController)
        {
            if (IsTutorialRound())
            {
                letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                letterController.SetPropVariation(LetterController.PropVariation.Nothing);
                return;
            }

            switch (game.Difficulty)
            {
            case ThrowBallsGame.ThrowBallsDifficulty.VeryEasy:
                letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                letterController.SetPropVariation(LetterController.PropVariation.Nothing);
                break;

            case ThrowBallsGame.ThrowBallsDifficulty.Easy:
                if (numRoundsWon < 2)
                {
                    letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                    letterController.SetPropVariation(LetterController.PropVariation.Nothing);
                }
                else
                {
                    letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
                    letterController.SetPropVariation(LetterController.PropVariation.Nothing);
                }
                break;

            case ThrowBallsGame.ThrowBallsDifficulty.Normal:
                if (numRoundsWon < 1)
                {
                    letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
                    letterController.SetPropVariation(LetterController.PropVariation.Nothing);
                }
                else if (numRoundsWon < 3)
                {
                    letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                    letterController.SetPropVariation(LetterController.PropVariation.StaticPileOfCrates);
                }
                else
                {
                    letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
                    letterController.SetPropVariation(LetterController.PropVariation.StaticPileOfCrates);
                }
                break;

            case ThrowBallsGame.ThrowBallsDifficulty.Hard:
                if (roundNumber < 4)
                {
                    if (Random.value <= 0.5f)
                    {
                        letterController.SetMotionVariation(LetterController.MotionVariation.Jumping);
                        letterController.SetPropVariation(LetterController.PropVariation.StaticPileOfCrates);
                    }
                    else
                    {
                        letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                        letterController.SetPropVariation(LetterController.PropVariation.SwervingPileOfCrates);
                    }
                }
                else
                {
                    if (Random.value <= 0.6f)
                    {
                        letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                        letterController.SetPropVariation(LetterController.PropVariation.SwervingPileOfCrates);
                    }
                    else
                    {
                        letterController.SetMotionVariation(LetterController.MotionVariation.Popping);
                        letterController.SetPropVariation(LetterController.PropVariation.Bush);
                    }
                }
                break;

            case ThrowBallsGame.ThrowBallsDifficulty.VeryHard:
                if (Random.value <= 0.4f)
                {
                    letterController.SetMotionVariation(LetterController.MotionVariation.Idle);
                    letterController.SetPropVariation(LetterController.PropVariation.SwervingPileOfCrates);
                }
                else
                {
                    letterController.SetMotionVariation(LetterController.MotionVariation.Popping);
                    letterController.SetPropVariation(LetterController.PropVariation.Bush);
                }
                break;
            }
        }