Ejemplo n.º 1
0
        /// <summary>
        /// Arguments:
        /// uint playerid
        /// </summary>
        private void PlayerLeft(RpcArgs args)
        {
            uint playerId = args.GetNext <uint>();
            var  player   = GetClientMockPlayer(playerId);

            if (player == null)
            {
                return;
            }

            MasterLobby.OnFNPlayerDisconnected(player);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Arguments:
        /// uint playerid
        /// string message
        /// </summary>
        private void MessageReceived(RpcArgs args)
        {
            uint   playerId = args.GetNext <uint>();
            string message  = args.GetNext <string>();
            var    player   = GetClientMockPlayer(playerId);

            if (player == null)
            {
                return;
            }

            MasterLobby.OnFNLobbyPlayerMessageReceived(player, message);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Arguments:
        /// uint playerid
        /// int teamid
        /// </summary>
        private void AssignTeam(RpcArgs args)
        {
            uint playerId = args.GetNext <uint>();
            int  teamId   = args.GetNext <int>();
            var  player   = GetClientMockPlayer(playerId);

            if (player == null)
            {
                return;
            }

            MasterLobby.OnFNTeamChanged(player, teamId);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Arguments:
        /// uint playerid
        /// int avatarid
        /// </summary>
        private void AssignAvatar(RpcArgs args)
        {
            uint playerId = args.GetNext <uint>();
            int  avatarId = args.GetNext <int>();
            var  player   = GetClientMockPlayer(playerId);

            if (player == null)
            {
                return;
            }

            MasterLobby.OnFNAvatarIDChanged(player, avatarId);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Arguments:
        /// uint playerid
        /// strng playername
        /// int teamid
        /// int avatarid
        /// </summary>
        private void SyncPlayer(RpcArgs args)
        {
            uint   playerId   = args.GetNext <uint>();
            string playerName = args.GetNext <string>();
            int    teamID     = args.GetNext <int>();
            int    avatarID   = args.GetNext <int>();
            var    player     = GetClientMockPlayer(playerId);

            if (player == null)
            {
                player = CreateClientMockPlayer(playerId, "Player " + playerId);
                MasterLobby.OnFNPlayerConnected(player);
            }

            player.Name     = playerName;
            player.TeamID   = teamID;
            player.AvatarID = avatarID;
            MasterLobby.OnFNPlayerSync(player);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Arguments:
        /// string playername
        /// uint playerid
        /// </summary>
        private void AssignName(RpcArgs args)
        {
            string playerName = args.GetNext <string>();
            uint   playerId   = args.GetNext <uint>();
            var    player     = GetClientMockPlayer(playerId);

            if (player == null)
            {
                return;
            }

            player.Name = playerName;

            if (networkObject.IsServer)
            {
                args.Info.SendingPlayer.Name = playerName;
            }

            MasterLobby.OnFNPlayerNameChanged(player);
        }