Esempio n. 1
0
    public void AssignNumber(Button gameobject)
    {
        gC.Mark(gameobject.name, turn);
        int newTurn = 0;

        if (turn == 1)
        {
            gameobject.GetComponentInChildren <Image>().sprite = circle;
            newTurn = 2;
        }
        else
        {
            gameobject.GetComponentInChildren <Image>().sprite = cross;
            newTurn = 1;
        }
        test.toggle(turn);

        gameobject.interactable = false;

        count++;

        if (count > 4)
        {
            gC.Check(turn);
        }

        turn = newTurn;
    }