using UnityEngine; using System.Collections; public class GameOver : MonoBehaviour { public UILabel LabelMessage; public UIButton CloseButton; void Start() { //GetComponent().Hide(); CloseButton.onClick.Add(new EventDelegate(OnClose)); //StartCoroutine(AlphaActive()); } public IEnumerator AlphaActive() { yield return new WaitForSeconds(1f); GetComponent().alpha = 1; } private void OnClose() { GetComponent().Hide(); } }