Beispiel #1
0
        public void RemoveUser(APIUser user)
        {
            Debug.Assert(Room != null);
            ((IMultiplayerClient)this).UserLeft(new MultiplayerRoomUser(user.Id));

            Schedule(() =>
            {
                if (Room.Users.Any())
                {
                    TransferHost(Room.Users.First().UserID);
                }
            });
        }
Beispiel #2
0
        public MultiplayerRoomUser AddUser(APIUser user, bool markAsPlaying = false)
        {
            var roomUser = new MultiplayerRoomUser(user.Id)
            {
                User = user
            };

            addUser(roomUser);

            if (markAsPlaying)
            {
                PlayingUserIds.Add(user.Id);
            }

            return(roomUser);
        }