예제 #1
0
    public void StartNewGame()
    {
        deck.click.Play();
        for (int i = 0; i < 4; i++)
        {
            deck.crowns[i].SetActive(false);
        }
        PlayerPrefs.SetInt("hakem", -1);
        deck.hakem = -1;
        PlayerPrefs.SetInt("totalLose", 0);
        PlayerPrefs.SetInt("friendsRounds", 0);
        PlayerPrefs.SetInt("oppsRounds", 0);
        continueBtn.SetActive(false);
        deck.friendsRoundsWon = 0;
        deck.oppsRoundsWon    = 0;
        string s = deck.oppsRoundsWon.ToString();

        if (PlayerPrefs.GetInt("usinglang", 0) == 1)
        {
            s = ArabicFixer.Fix(s);
            deck.oppsRounds.GetComponent <Text>().font = deck.yekta;
        }
        deck.oppsRounds.GetComponent <Text>().text = s;
        s = deck.friendsRoundsWon.ToString();
        if (PlayerPrefs.GetInt("usinglang", 0) == 1)
        {
            s = ArabicFixer.Fix(s);
            deck.yourRounds.GetComponent <Text>().font = deck.yekta;
        }
        deck.yourRounds.GetComponent <Text>().text = s;
        StartCoroutine(deck.chooseHakem());
    }