public void joinTeamYellowBtn()
    {
        JoinTeamMessage _msg = new JoinTeamMessage()
        {
            objectTransformName = Manager.Instance.PlayerID,
            nickname            = Manager.Instance.PlayerID,
            team = 3
        };

        NetworkManager.singleton.client.Send(join_team_msg, _msg);
    }
Beispiel #2
0
    //recebe do servidor pedido de um jogador de se juntar a uma equipa
    private void OnReceiveJoinTeamMessage(NetworkMessage _message)
    {
        JoinTeamMessage _msg = _message.ReadMessage <JoinTeamMessage>();

        gameStateManagerObj.GetComponent <GameStateManager>().addToTeam(_msg.team, _msg.objectTransformName);
    }
Beispiel #3
0
    //é necessário?
    private void OnReceiveJoinTeamMessage(NetworkMessage _message)
    {
        JoinTeamMessage _msg = _message.ReadMessage <JoinTeamMessage>();

        NetworkServer.SendToAll(join_team_msg, _msg);
    }