Exemplo n.º 1
0
    //ランダム入室
    public void RandomJoinRoom()
    {
        DialogController.OpenMessage(DialogController.MESSAGE_SEARCH_ROOM, DialogController.MESSAGE_POSITION_RIGHT);
        Action callback = () =>
        {
            PhotonNetwork.JoinRandomRoom();
        };

        RoomApi.Clear roomApiClear = new RoomApi.Clear();
        roomApiClear.SetApiFinishCallback(callback);
        roomApiClear.Exe();
    }
Exemplo n.º 2
0
    private void JoinRoom(string roomName = "")
    {
        if (!PhotonNetwork.connectedAndReady)
        {
            return;
        }
        if (roomName == "")
        {
            RandomJoinRoom();
            return;
        }

        DialogController.OpenMessage(DialogController.MESSAGE_JOIN_ROOM, DialogController.MESSAGE_POSITION_RIGHT);

        Action callback = () =>
        {
            PhotonNetwork.JoinRoom(roomName);
        };

        RoomApi.Clear roomApiClear = new RoomApi.Clear();
        roomApiClear.SetApiFinishCallback(callback);
        roomApiClear.Exe();
    }