Exemplo n.º 1
0
        private void OnJoinRoom(UserLogicModel user, RoomJoinRequest data)
        {
            Logger.Log(user.UserName + " join room", LogLevel.DebugInformation);

            removeUserFromRoom(user,
                               disconnectedRoom =>
                               {
                                   myDataManager.SiteData.Room_JoinRoom(data.GameType,
                                                                        data.RoomName,
                                                                        user,
                                                                        (room) =>
                                                                        {
                                                                            mySiteClientManager.RoomJoined(user, new RoomJoinResponse(room));
                                                                            mySiteClientManager.JoinChatRoom(user, new JoinChatRoomRequest(room));

                                                                            foreach (var UserLogicModel in room.Players)
                                                                            {
                                                                                mySiteClientManager.SendRoomInfo(UserLogicModel, new GetRoomInfoResponse(room));
                                                                            }
                                                                        }
                                           );
                               });
        }
 public void JoinRoom(RoomJoinRequest joinRoom)
 {
     clientSiteManager.JoinRoom(joinRoom);
 }
Exemplo n.º 3
0
 public void JoinRoom(RoomJoinRequest joinRoom)
 {
     myGateway.Emit("Area.Site.JoinRoom", joinRoom);
 }