Пример #1
0
    public static void JoinLobby(string lobbyName)
    {
        NetworkDebugCanvas.SetConnectingStatus("Joining Room");

        GameManager.EnterQueue();

        PhotonNetwork.JoinRoom(lobbyName);
    }
Пример #2
0
    public override void OnCreatedRoom()
    {
        NetworkDebugCanvas.SetConnectionStatus("Created Room");

        NetworkDebugCanvas.SetConnectingStatus("Waiting for Opponent");

        //AudioSFXReferences.PlayQueueingMusic();
    }
Пример #3
0
    public static void QueueForRandomMM()
    {
        NetworkDebugCanvas.SetConnectingStatus("Joining Random Open Room");

        GameManager.EnterQueue();

        PhotonNetwork.JoinRandomRoom();
    }
Пример #4
0
    public override void OnConnectedToMaster()
    {
        TitleScreen.ConnectedToServer = true;
        //enable Buttons;
        NetworkDebugCanvas.SetConnectionStatus("Connected To Master");

        NetworkDebugCanvas.SetConnectingStatus("Waiting");
    }
Пример #5
0
    //short code 32757 is the code for max CCU reached. We need to impliment this if 20 people are more are trying to connect
    //32766 when gameID is already in use
    private void Start()
    {
        NetworkDebugCanvas.SetConnectionStatus("Disconnected");

        NetworkDebugCanvas.SetConnectingStatus("Connecting To Master Server");

        PhotonNetwork.ConnectUsingSettings();
    }
Пример #6
0
    public override void OnJoinRandomFailed(short returnCode, string message)
    {
        NetworkDebugCanvas.SetConnectionStatus("Failed To Join Room");

        NetworkDebugCanvas.SetConnectingStatus("Creating New Room");

        RoomOptions roomOptions = new RoomOptions();

        roomOptions.IsVisible  = true;
        roomOptions.MaxPlayers = 2;
        PhotonNetwork.JoinOrCreateRoom(RandomUtil.GenerateRandomString(20), roomOptions, TypedLobby.Default);
    }
Пример #7
0
    public static void CreateLobby(string lobbyName)
    {
        NetworkDebugCanvas.SetConnectingStatus("Creating Random Room");

        GameManager.EnterQueue();

        RoomOptions roomOptions = new RoomOptions();

        roomOptions.IsVisible  = true;
        roomOptions.MaxPlayers = 2;
        PhotonNetwork.JoinOrCreateRoom(lobbyName, roomOptions, TypedLobby.Default);
    }