/// <summary> /// Method to be called when the user wants to try to connect to an existing room. /// </summary> public void JoinRoom(byte maxPlayers, int level, ProjectDelegates.RoomInfoCallback JoinedRoomCallback) { this.maxPlayers = maxPlayers; this.level = level; OnJoinedRoomCallback = JoinedRoomCallback; string sqlFilter = "C0 > " + (level - 3) + " AND C0 < " + (level + 3); Debug.Log(sqlFilter); TypedLobby typedLobby = new TypedLobby("GameLobby", LobbyType.Default); PhotonNetwork.JoinRandomRoom(null, maxPlayers, MatchmakingMode.FillRoom, typedLobby, ""); //PhotonNetwork.JoinRandomRoom (, MatchmakingMode.FillRoom, typedLobby, sqlFilter); }
/// <summary> /// Method to be called when the user wants to create a new room. /// </summary> public void CreateNewRoom(int numberOfPlayers, ProjectDelegates.RoomInfoCallback RoomCreatedCallback, int level) { OnJoinedRoomCallback = RoomCreatedCallback; ExitGames.Client.Photon.Hashtable customParams = new ExitGames.Client.Photon.Hashtable(); customParams.Add("C0", level); RoomOptions options = new RoomOptions(); options.maxPlayers = numberOfPlayers; TypedLobby typedLobby = new TypedLobby("GameLobby", LobbyType.Default); //PhotonNetwork.CreateRoom ("",options,typedLobby); //PhotonNetwork.CreateRoom ("", true, true, numberOfPlayers); // testing this to git rid of the build warning PhotonNetwork.CreateRoom("", options, typedLobby); }
/// <summary> /// Updates Callback to handle room properties change. /// </summary> /// <param name="OnPlayersUpdate">Callback.</param> public void SetPropertiesChangeCallback(ProjectDelegates.RoomInfoCallback OnPlayersUpdate) { OnRoomPropertiesUpdate = OnPlayersUpdate; }
/// <summary> /// Method to be called when the user wants to try to connect to an existing room. /// </summary> public void JoinRoom(byte maxPlayers, int level, ProjectDelegates.RoomInfoCallback JoinedRoomCallback) { this.maxPlayers = maxPlayers; this.level = level; OnJoinedRoomCallback = JoinedRoomCallback; string sqlFilter = "C0 > " + (level-3) + " AND C0 < " + (level+3); Debug.Log (sqlFilter); TypedLobby typedLobby = new TypedLobby("GameLobby",LobbyType.Default); PhotonNetwork.JoinRandomRoom(null,maxPlayers,MatchmakingMode.FillRoom,typedLobby,""); //PhotonNetwork.JoinRandomRoom (, MatchmakingMode.FillRoom, typedLobby, sqlFilter); }
/// <summary> /// Method to be called when the user wants to create a new room. /// </summary> public void CreateNewRoom(int numberOfPlayers,ProjectDelegates.RoomInfoCallback RoomCreatedCallback, int level) { OnJoinedRoomCallback = RoomCreatedCallback; ExitGames.Client.Photon.Hashtable customParams = new ExitGames.Client.Photon.Hashtable(); customParams.Add("C0", level); RoomOptions options = new RoomOptions(); options.maxPlayers = numberOfPlayers; TypedLobby typedLobby = new TypedLobby("GameLobby",LobbyType.Default); //PhotonNetwork.CreateRoom ("",options,typedLobby); //PhotonNetwork.CreateRoom ("", true, true, numberOfPlayers); // testing this to git rid of the build warning PhotonNetwork.CreateRoom("", options, typedLobby); }
/// <summary> /// Updates Callback to handle room properties change. /// </summary> /// <param name="OnPlayersUpdate">Callback.</param> public void SetPropertiesChangeCallback(ProjectDelegates.RoomInfoCallback OnPlayersUpdate) { OnRoomPropertiesUpdate = OnPlayersUpdate; }