當前位置: 首頁>>代碼示例>>C#>>正文


C# CanvasRenderer.GetComponentInChildren方法代碼示例

本文整理匯總了C#中UnityEngine.CanvasRenderer.GetComponentInChildren方法的典型用法代碼示例。如果您正苦於以下問題:C# CanvasRenderer.GetComponentInChildren方法的具體用法?C# CanvasRenderer.GetComponentInChildren怎麽用?C# CanvasRenderer.GetComponentInChildren使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UnityEngine.CanvasRenderer的用法示例。


在下文中一共展示了CanvasRenderer.GetComponentInChildren方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: showJob

    public void showJob()
    {
        jobshown = true;
        shownJobBtn.GetComponentInChildren<Text>().text = "Hide Job";

        renderedJob = Instantiate(jobPrefab);
        renderedJob.gameObject.transform.SetParent(canvasTrans, false);
        renderedJob.GetComponentInChildren<Text>().text = job.title + " \n\n " + job.description;
    }
開發者ID:Scythus,項目名稱:InhumanResources,代碼行數:9,代碼來源:UIManagerScript.cs

示例2: acceptCurrentCandidate

    public void acceptCurrentCandidate() {
        contractshown = true;
        Score scorer = new Score(cvList[currentCV], job);

        renderedContract = Instantiate(contractPrefab);
        renderedContract.gameObject.transform.SetParent(canvasTrans, false);
        renderedContract.GetComponentInChildren<Text>().text = "Contract for "+job.title + " \n\n " + "New Hire: "+cvList[currentCV].candidate.getName()+"\n\n"+ scorer.getNormalisedScoreBreakdown(cvList);

        TotalScore.totalScore += scorer.normalisedScore;
        refreshHUD();

        Button accept = renderedContract.GetComponentInChildren<Button>();
        accept.onClick.AddListener(() => btnNextJob());

        stamp.Play();
        StartCoroutine(waitAndDisplay(renderedContract.transform.Find("Hired").gameObject, 1.7f));

    }
開發者ID:Scythus,項目名稱:InhumanResources,代碼行數:18,代碼來源:UIManagerScript.cs

示例3: renderCV

    public void renderCV() {
        renderedCV = Instantiate(cvPrefab);
        renderedCV.gameObject.transform.SetParent(canvasTrans, false);
        renderedCV.GetComponentInChildren<Text>().text = cvList[currentCV].candidate.getName()+" \n\n"+ cvList[currentCV].getCVText();

        Button accept = renderedCV.GetComponentInChildren<Button>();
        accept.onClick.AddListener(() => btnAccept());

        // Set Portrait
        Image mug = renderedCV.transform.Find("CV Mug").GetComponent<Image>();
        mug.sprite = cvList[currentCV].candidate.getCVPic();

    }
開發者ID:Scythus,項目名稱:InhumanResources,代碼行數:13,代碼來源:UIManagerScript.cs


注:本文中的UnityEngine.CanvasRenderer.GetComponentInChildren方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。