123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- using UnityEngine;
- using System.Collections;
- public class UIThanks : MonoBehaviour {
- public GameObject First;
- public GameObject Second;
- public static UIThanks Instance { get; private set; }
- private float _wait = -1;
- internal void Awake()
- {
- Instance = this;
- }
- internal void Start()
- {
- Instance = this;
- }
- private void OnEnable()
- {
- if (PlayerPrefs.GetInt("GetCoupon") == 1)
- {
- // Debug.Log(PlayerPrefs.GetInt("GetCoupon"));
- StartCoroutine(CouponePopup());
- }
- }
- IEnumerator CouponePopup()
- {
- yield return new WaitForSeconds(0.5f);
- LoginManager.Instance.CouponGetEnterNumber.Show();
- }
- void Update()
- {
- if (_wait > 0.1f && Time.timeSinceLevelLoad > _wait)
- {
- _wait = -1;
- //First.SetActive(false);
- //Second.SetActive(true);
- }
- }
- public void OnShow()
- {
- /*if (AdwareRequest.HasAdware)
- {
- AdwareRequest.Show();
- First.SetActive(true);
- Second.SetActive(false);
- StartCoroutine(ShowNext());
- }
- else
- {
- StartCoroutine(ShowNext());
- }*/
- // First.SetActive(true);
- //Second.SetActive(true);
- //_wait = Time.timeSinceLevelLoad + 3;
- // StartCoroutine(ShowNext());
- }
- /* private IEnumerator ShowNext()
- {
- yield return new WaitForSeconds(3f);
- First.SetActive(false);
- Second.SetActive(true);
- }*/
-
- }
|