예제 #1
0
 public void CreateConnection()
 {
     startMenu.ShowConnectingCanvas();
     statusText.text = "Connecting to Server...";
     ServerConnectionSettings.SetServerConnectionSettings();
     PhotonNetwork.ConnectUsingSettings();
 }
예제 #2
0
        public void CreateGame()
        {
            startMenu.ShowConnectingCanvas();
            statusText.text = "Creating Room...";

            RoomOptions roomOptions = new RoomOptions();

            roomOptions.MaxPlayers = BitConverter.GetBytes((int)playersCountSlider.value)[0];
            roomOptions.IsVisible  = publicToggle.isOn;

            PhotonNetwork.CreateRoom(gameNameField.text, roomOptions);
        }