Example #1
0
        /// <summary>
        ///     Called when a user has joined the multiplayer game
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnUserJoinedGame(object sender, UserJoinedGameEventArgs e)
        {
            var user = OnlineManager.OnlineUsers[e.UserId];

            // Add the player to the player list.
            PlayerList.AddOrUpdatePlayer(user.OnlineUser);

            var log = $"{( user.HasUserInfo ? user.OnlineUser.Username : $"User#{e.UserId}" )} has joined the game.";
Example #2
0
 private void OnUserJoinedGame(object sender, UserJoinedGameEventArgs e) => SetRichPresence();