WrongConnectEnternet.cs 573 B

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