GameOver.cs 557 B

123456789101112131415161718192021222324252627
  1. using UnityEngine;
  2. using System.Collections;
  3. public class GameOver : MonoBehaviour {
  4. public UILabel LabelMessage;
  5. public UIButton CloseButton;
  6. void Start()
  7. {
  8. //GetComponent<ScreenBase>().Hide();
  9. CloseButton.onClick.Add(new EventDelegate(OnClose));
  10. //StartCoroutine(AlphaActive());
  11. }
  12. public IEnumerator AlphaActive()
  13. {
  14. yield return new WaitForSeconds(1f);
  15. GetComponent<UIPanel>().alpha = 1;
  16. }
  17. private void OnClose()
  18. {
  19. GetComponent<ScreenBase>().Hide();
  20. }
  21. }