Example #1
0
    public void FlashWinnerText()
    {
        if (OTPoints.GetComponent <SpriteRenderer>().sprite.name.Equals("BLANK"))
        {
            if (isSinglePlayer)
            {
                robo.pout();
            }

            BRWinner.GetComponent <SpriteRenderer>().enabled = true;
            //PlayerPrefs.SetInt("numberOfWins", 9 );
            PlayerPrefs.SetInt("numberOfWins", (PlayerPrefs.GetInt("numberOfWins") + 1));
            //Debug.Log("NUMBER OF WINS:" + PlayerPrefs.GetInt("numberOfWins"));

            if (PlayerPrefs.GetInt("hasRatedGame") != 1)
            {
                if (PlayerPrefs.GetInt("numberOfWins") == 5)
                {
                    leftSideMenu.DisplayRateMenu();
                }
                else if (PlayerPrefs.GetInt("numberOfWins") == 25)
                {
                    leftSideMenu.DisplayRateMenu();
                }
                else if (PlayerPrefs.GetInt("numberOfWins") == 100)
                {
                    leftSideMenu.DisplayRateMenu();
                }
            }
        }
        else if (BRPoints.GetComponent <SpriteRenderer>().sprite.name.Equals("BLANK"))
        {
            if (isSinglePlayer)
            {
                robo.celebrate();
            }

            OTWinner.GetComponent <SpriteRenderer>().enabled = true;
        }

        DetermineAchievements();
    }