コード例 #1
0
    public override void OnPhotonPlayerConnected(PhotonPlayer newPlayer)
    {
        GameObject friendsobj   = GameObject.Find("FriendManager");
        PUNFriends friendscript = friendsobj.GetComponent <PUNFriends>();

        friendscript.photonView.RPC("SendHostData", PhotonTargets.All, UsernameScript.username.username + UsernameScript.username.userId);
    }
コード例 #2
0
    public void activateChallengeUI(string name)
    {
        GameObject friendsobj   = GameObject.Find("FriendManager");
        PUNFriends friendscript = friendsobj.GetComponent <PUNFriends>();

        friendscript.showChallengerUI(name);
    }
コード例 #3
0
    public override void OnJoinedRoom()
    {
        if (FriendInviteRoom)
        {
            //check if its the master otherwise show the ui and make the friendscreen popup
            if (!PhotonNetwork.isMasterClient)
            {
                GameObject friendsobj   = GameObject.Find("FriendManager");
                PUNFriends friendscript = friendsobj.GetComponent <PUNFriends>();

                friendscript.ShowFriendUI();
                friendscript.clientAddingScreen();
            }
        }
        else
        {
            //PhotonNetwork.LoadLevel(3);
        }
    }