Ejemplo n.º 1
0
/*
 * IEnumerator Timer(){
 * yield return new WaitForSeconds(3f);
 * Itext.SetActive(false);
 * }
 */

    void Update()
    {
        if (time > 0)
        {
            time -= Time.deltaTime;
            Itext.SetActive(true);
            Itext.GetComponent <TextMeshProUGUI>().text = "I will disappear in " + Mathf.Ceil(time);
        }
        else
        {
            Itext.SetActive(false);
        }
    }