Exemplo n.º 1
0
    IEnumerator WaitGameValidation()
    {
        yield return(new WaitForSeconds(1.5f));

        state = GameState.VALIDATING;

        yield return(new WaitForSeconds(1f));

        ValidateVictoryCard();

        //yield return new WaitForSeconds(1f);

        texts.CalculatePoints();

        if (!IsFinalRound())
        {
            roundCounter.Play("Show");

            yield return(new WaitForSeconds(0.25f));

            StartNextGameRound();
        }
        else
        {
            finalScoreText.text = finalScoreShadow.text = texts.NextPlayerScore + " - " + texts.NextComputerScore;

            if (texts.NextPlayerScore > texts.NextComputerScore)
            {
                GameUtils.SavePlayerScore(texts.NextPlayerScore - texts.NextComputerScore);

                message.RunWinMessage();
            }
            else if (texts.NextPlayerScore < texts.NextComputerScore)
            {
                GameUtils.SavePlayerScore(-(texts.NextComputerScore - texts.NextPlayerScore));

                message.RunLoseMessage();
            }
            else
            {
                message.RunDrawMessage();
            }

            ConnectionUtils.Instance.ShowFullScreen();

            yield return(new WaitForSeconds(1.5f));

            cutScene.FadeOut(LoadMenuScene);
        }
    }
Exemplo n.º 2
0
    IEnumerator WaitLoadMenu()
    {
        yield return(new WaitForSeconds(3));

        cutScene.FadeOut(LoadMenuScene);
    }