Esempio n. 1
0
    private void Start()
    {
        amountOfCards = 28;
        fullDeck      = new bool[28];
        ResetCards(fullDeck);

        playerHand = GameObject.FindGameObjectWithTag("PlayerHand").transform;
        serverData = this.GetComponent <ServerData>();

        Table = GameObject.FindGameObjectWithTag("Table");

        if (Table == null)
        {
            Debug.LogError("There's no table");
        }


        //serverData.PrintAllPlayers();

        AddPlayerOnList();

        if (PhotonNetwork.IsMasterClient)
        {
            DistributeByArrays();
            serverData.DistributeByArray(cardsToGive1, cardsToGive2, cardsToGive3, cardsToGive4);
        }

        //serverData.PrintAllPlayers();
    }