コード例 #1
0
    //생성된 버튼 클릭하면, CurrentRoomCanvas.cs 에 PlayerKick() 로 PhotonPlayer를 넘겨줌
    public void ButtonAddListener()
    {
        CurrentRoomCanvas currentRoomCanvas = GetComponentInParent <CurrentRoomCanvas>();

        playerPrefabButton = transform.Find("KickButton").GetComponent <Button>();
        playerPrefabButton.onClick.AddListener(() => currentRoomCanvas.PlayerKick(PhotonPlayer));
    }
コード例 #2
0
ファイル: PlayerListing.cs プロジェクト: kunana/AOS
    //생성된 버튼 클릭하면, CurrentRoomCanvas.cs 에 PlayerKick() 로 PhotonPlayer를 넘겨줌
    public void ButtonAddListener()
    {
        GameObject        CurRoomCanvas = GetComponentInParent <CurrentRoomCanvas>().gameObject;
        CurrentRoomCanvas crCanvas      = CurRoomCanvas.GetComponent <CurrentRoomCanvas>();

        PlayerPrefabButton = transform.Find("KickButton").GetComponent <Button>();
        PlayerPrefabButton.onClick.AddListener(() => crCanvas.PlayerKick(PhotonPlayer));
    }