Exemplo n.º 1
0
    public void SetRole(int roleNum)
    {
        GameObject[] gameObjects = GameObject.FindGameObjectsWithTag("LobbyPlayer");
        foreach (GameObject playerObject in gameObjects)
        {
            LobbyPlayer player = playerObject.GetComponent <LobbyPlayer>();

            if (player.isLocalPlayer)
            {
                player.SetRole(roleNum);
            }
        }
    }