コード例 #1
0
ファイル: FluidClient.cs プロジェクト: AustinJGreen/Fluid
        /// <summary>
        /// Loads the player object
        /// </summary>
        public PlayerObject LoadMyPlayerObject()
        {
            LobbyConnection lobbyConnection = GetLobbyConnection().Join();

            if (lobbyConnection != null)
            {
                PlayerObject playerObject = lobbyConnection.GetPlayerObject();
                lobbyConnection.Disconnect();

                return(playerObject);
            }

            return(null);
        }
コード例 #2
0
ファイル: FluidClient.cs プロジェクト: AustinJGreen/Fluid
        /// <summary>
        /// Loads a profile
        /// </summary>
        /// <param name="username">The username</param>
        public Profile LoadProfile(string username)
        {
            LobbyConnection lobbyConnection = GetLobbyConnection().Join();

            if (lobbyConnection != null)
            {
                Profile profile = lobbyConnection.GetProfile(username);
                lobbyConnection.Disconnect();

                return(profile);
            }

            return(null);
        }
コード例 #3
0
ファイル: FluidClient.cs プロジェクト: AustinJGreen/Fluid
        /// <summary>
        /// Creates a lobby connection
        /// </summary>
        /// <returns>The lobby connection</returns>
        internal Connection JoinLobby()
        {
            int currentVersion = GetGameVersion();

            if (currentVersion == -1)
            {
                //Logged message will be from .GetGameVersion() if failed.
                return(null);
            }

            PlayerType currentPlayerType = GetConnectionType(ConnectionUserId);
            string     lobbyRoomFormat   = (currentPlayerType == PlayerType.Guest) ? m_Config.LobbyGuestRoom : m_Config.LobbyRoom;
            string     lobbyRoom         = string.Format(lobbyRoomFormat, currentVersion);

            LobbyConnection lobbyCon = new LobbyConnection(this);

            return(m_Client.Multiplayer.CreateJoinRoom(ConnectionUserId, lobbyRoom, true, null, null));
        }