public void Z_QuickMatch()
    {
        multiMode = MultiMode.QuickMatch;

        // we check if we are connected or not, we join if we are , else we initiate the connection to the server.
        if (PhotonNetwork.IsConnected)
        {
            LogFeedback("Joining Room...", "Blue");
            // #Critical we need at this point to attempt joining a Random Room. If it fails, we'll get notified in OnJoinRandomFailed() and we'll create one.
            PhotonNetwork.JoinRandomRoom();
        }
        else
        {
            LogFeedback("Connecting...", "Blue");

            // #Critical, we must first and foremost connect to Photon Online Server.
            PhotonNetwork.GameVersion = this.gameVersion;
            PhotonNetwork.ConnectUsingSettings();
        }
    }
Beispiel #2
0
    void Awake()
    {
        mcc = new MultiCamControls[cam.Length];
        for (int i = 0; i < cam.Length; i++)
        {
            cam[i].fieldOfView   = fov;
            cam[i].nearClipPlane = nearClip;
            cam[i].farClipPlane  = farClip;
            mcc[i]              = cam[i].GetComponent <MultiCamControls>();
            mcc[i].screenWidth  = screenWidth;
            mcc[i].screenHeight = screenHeight;
            mcc[i].fullscreen   = fullscreen;
            mcc[i].step         = step;
        }

        if (renderCam != null)
        {
            mmode = MultiMode.CAM_TO_TEX;
        }
    }
 public void Z_OpenJoinRoom()
 {
     multiMode = MultiMode.JoinRoom;
     gameJoinRoom.SetActive(true);
 }