コード例 #1
0
ファイル: GUIManage.cs プロジェクト: yty/miaobox_open
 public void notifi(string text, float inteval)
 {
     notify.gameObject.SetActive(true);
     notify.text  = text;
     notify.alpha = 1;
     StartCoroutine(MiaoBoxTool.FadeText(notify, inteval, new Color(0, 0, 0, 0)));
 }
コード例 #2
0
ファイル: GUIManage.cs プロジェクト: yty/miaobox_open
    public IEnumerator  showText(float inteval)
    {
        cooldownText.gameObject.SetActive(true);
        cooldownText.text = inteval.ToString();
        StartCoroutine(MiaoBoxTool.FadeText(cooldownText, 1f, new Color(0, 0, 0, 0)));

        while (inteval > 1)
        {
            yield return(new WaitForSeconds(1f));

            cooldownText.alpha = 1;
            inteval--;
            cooldownText.text = inteval.ToString();
            StartCoroutine(MiaoBoxTool.FadeText(cooldownText, 1f, new Color(0, 0, 0, 0)));
            yield return(null);
        }
    }