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


C# Text.CrossFadeAlpha方法代碼示例

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


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

示例1: Awake

    // Use this for initialization
    void Awake() // Or awake? haven't had problems.
    {
        S = this;

        targetText = transform.GetChild(0).GetComponent<Text>(); // Only if you place this on my specific object setup of UI Image with child UI Text.
        this.GetComponent<Image>().CrossFadeAlpha(0, 0, true);
        targetText.CrossFadeAlpha(0, 0, true);
    }
開發者ID:9,項目名稱:RitualRex-GGJ2016,代碼行數:9,代碼來源:TextTyper.cs

示例2: BlinkText

 IEnumerator BlinkText(Text text)
 {
     while (true)
     {
         yield return new WaitForSeconds(1.2f);
         float alpha = 1f;
         if (text.canvasRenderer.GetAlpha() == 1f) alpha = 0.1f;
         text.CrossFadeAlpha(alpha, 1.2f, false);
     }
 }
開發者ID:mnefzger,項目名稱:Open-Games-Workshop,代碼行數:10,代碼來源:TextTyper.cs

示例3: Start

    void Start()
    {
        // Set the fade and next scene time
        fadeInAt = Time.time + FADE_DELAY;
        fadeOutAt = Time.time + WARNING_TIME - FADE_DURATION;
        nextSceneAt = Time.time + WARNING_TIME;

        // Get the text objects
        warningTextComp = warningTextObj.GetComponent<Text>();
        loadingTextComp = loadingTextObj.GetComponent<Text>();

        // Fade out (instantly)
        warningTextComp.CrossFadeAlpha(0.0f, 0.0f, false);
        loadingTextComp.CrossFadeAlpha(0.0f, 0.0f, false);
    }
開發者ID:timvisee,項目名稱:AIVDnet,代碼行數:15,代碼來源:WarningController.cs

示例4: Start

 // Use this for initialization
 void Start()
 {
     cachedText = this.GetComponent<Text>();
     cachedText.CrossFadeAlpha(0, DestroyAfter, true);
     Destroy(this.gameObject, DestroyAfter + 0.5f);
 }
開發者ID:perfectdaemon,項目名稱:ragdoll-arena,代碼行數:7,代碼來源:TextDissapearController.cs

示例5: FlashText

 IEnumerator FlashText(Text txt, int times)
 {
     yield return new WaitForSeconds(0.25f);
     int i = 0;
     while (i < times) {
         txt.CrossFadeAlpha(0.0f, 0.2f, false);
         yield return new WaitForSeconds(0.2f);
         txt.CrossFadeAlpha(1.0f, 0.2f, false);
         yield return new WaitForSeconds(0.2f);
         i += 1;
     }
 }
開發者ID:5thFloorGames,項目名稱:FollowTheLight,代碼行數:12,代碼來源:UserInterfaceManager.cs

示例6: FadeOut

 IEnumerator FadeOut(GameObject FadingPanel, Text FadingText)
 {
     yield return new WaitForSeconds(FadeTimer);
     FadingPanel.GetComponent<Image>().CrossFadeAlpha(0f, (Time.deltaTime * 100), false);
     FadingText.CrossFadeAlpha(0f, (Time.deltaTime * 100), false);
     NodeToDelete.SetActive(false);
 }
開發者ID:JasonSlingsCode,項目名稱:CNR,代碼行數:7,代碼來源:SpeechBubbles.cs


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