private HoloNetRoom ConvertToHolonetRoom(RoomInfo photonRoomInfo)
        {
            var result = new HoloNetRoom();

            result.id       = photonRoomInfo.Name;
            result.name     = (string)photonRoomInfo.CustomProperties["N"] ?? "";
            result.roomType = (string)photonRoomInfo.CustomProperties["C0"] ?? "";

            result.isVisible = photonRoomInfo.IsVisible;
            result.isOpen    = photonRoomInfo.IsOpen;

            result.playersCount = photonRoomInfo.PlayerCount;
            result.maxPlayers   = photonRoomInfo.MaxPlayers;

            result.password = (string)photonRoomInfo.CustomProperties["P"] ?? "";
            return(result);
        }
Beispiel #2
0
 public static AsyncOp JoinRoom(HoloNetRoom room, Action <AsyncOp> callback = null)
 {
     return(HoloNetAppModule.instance.provider.JoinRoom(room.id, callback));
 }
Beispiel #3
0
 public void ClearCurrentRoom()
 {
     currentRoom = null;
 }
Beispiel #4
0
 public void SetCurrentRoom(HoloNetRoom newRoom)
 {
     currentRoom = newRoom;
 }