1234567891011121314151617181920212223242526272829303132333435363738 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class AgreeConditions : MonoBehaviour {
- public UILabel LabelMessage;
- public Button OkButton;
- public UIButton CloseButton;
- public Toggle Check;
- public CanvasGroup CanvasCroup;
- void Start()
- {
- //GetComponent<ScreenBase>().Hide();
- OkButton.onClick.AddListener(OnClose);
- //StartCoroutine(AlphaActive());
- }
- public IEnumerator AlphaActive()
- {
- yield return new WaitForSeconds(1f);
- GetComponent<UIPanel>().alpha = 1;
- }
- private void OnClose()
- {
- if(Check.isOn)
- {
- PlayerPrefs.SetInt("FirstEnter", 1);
- PlayerPrefs.Save();
- CanvasCroup.alpha = 0;
- }
-
- }
- }
|