Esempio n. 1
0
        private void OnCreateRoom(UserLogicModel user, CreateRoomRequest data)
        {
            Logger.Log(user.UserName + " create room", LogLevel.DebugInformation);
            removeUserFromRoom(user,
                               disconnectedRoom =>
                               {
                                   myDataManager.SiteData.Room_CreateRoom(data.GameType,
                                                                          data.RoomName,
                                                                          user,
                                                                          (room) =>
                                                                          {
                                                                              mySiteClientManager.CreateChatRoom(user, new CreateChatRoomRequest(room));

                                                                              mySiteClientManager.RoomJoined(user, new RoomJoinResponse(room));
                                                                              myDataManager.SiteData.Room_GetAllByGameType(data.GameType, a => { mySiteClientManager.SendRooms(user, new GetRoomsResponse(a)); });
                                                                          });
                               });
        }
 public void CreateRoom(CreateRoomRequest createRoom)
 {
     clientSiteManager.CreateRoom(createRoom);
 }
Esempio n. 3
0
        private void OnCreateRoom(UserLogicModel user, CreateRoomRequest data)
        {

            ServerLogger.LogDebug(user.UserName + " create room", user);
            removeUserFromRoom(user,
                               disconnectedRoom =>
                               {
                                   myDataManager.SiteData.Room_CreateRoom(data.GameType,
                                                                          data.RoomName,
                                                                          user,
                                                                          (room) =>
                                                                          {
                                                                              mySiteClientManager.CreateChatRoom(user, new CreateChatRoomRequest(room.ToModel()));

                                                                              mySiteClientManager.RoomJoined(user, new RoomJoinResponse(room.ToModel()));
                                                                              myDataManager.SiteData.Room_GetAllByGameType(data.GameType, a => { mySiteClientManager.SendRooms(user, new GetRoomsResponse(a.Map(b => b.ToModel()))); });
                                                                          });
                               });
        }
Esempio n. 4
0
 public void CreateRoom(CreateRoomRequest createRoom)
 {
     myGateway.Emit("Area.Site.CreateRoom", createRoom);
 }