Exemplo n.º 1
0
    private void addPlayer(int device_id)
    {
        GameObject   newPlayer = Instantiate(prefabPlayer);
        playerScript newScript = newPlayer.GetComponent <playerScript>();

        newScript.init(device_id);
        lstPlayer[newScript.player] = newScript;
        arrangePlayer();

        //if (currentPlayer == -1)
        //	setNextPlayer();

        newScript.setActive(currentPlayer == newScript.player);
    }