コード例 #1
0
    // Use this for initialization
    void Start()
    {
        partySystem    = GameObject.Find("Scripts").GetComponent <PartySystem>();
        memberFrame    = new GameObject[4];
        memberFrame[0] = firstMember;
        memberFrame[1] = secondMember;
        memberFrame[2] = thirdMember;
        memberFrame[3] = fourthMember;
        removeButton.SetActive(true);

        // 脱退ボタンのメソッド登録
        removeButton.GetComponent <UnityEngine.UI.Button>().onClick.AddListener(() => partySystem.RemoveMemberInParty(PhotonNetwork.player.ID));
        removeButton.SetActive(false);
    }
コード例 #2
0
ファイル: ShowPartyMember.cs プロジェクト: GochiMMO/MMO
    // Use this for initialization
    void Start()
    {
        partySystem = GameObject.Find("Scripts").GetComponent<PartySystem>();
        memberFrame = new GameObject[4];
        memberFrame[0] = firstMember;
        memberFrame[1] = secondMember;
        memberFrame[2] = thirdMember;
        memberFrame[3] = fourthMember;
        removeButton.SetActive(true);

        // 脱退ボタンのメソッド登録
        removeButton.GetComponent<UnityEngine.UI.Button>().onClick.AddListener(() => partySystem.RemoveMemberInParty(PhotonNetwork.player.ID));
        removeButton.SetActive(false);
    }