| 12345678910111213141516171819202122232425262728293031323334353637 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class AgreementPopup : MonoBehaviour
- {
- void Start()
- {
- if (PlayerPrefs.GetInt("AgreementPopupChecked", 0) == 1) {
- this.gameObject.SetActive(false);
- LoginView.ins.SetAgreementChecked(true);
- }
- }
- public void Agree() {
- PlayerPrefs.SetInt("AgreementPopupChecked", 1);
- this.gameObject.SetActive(false);
- LoginView.ins.SetAgreementChecked(true);
- }
- [System.NonSerialized] public System.Action onDisagree;
- public void Disagree() {
- PlayerPrefs.SetInt("AgreementPopupChecked", 0);
- this.gameObject.SetActive(false);
- LoginView.ins.SetAgreementChecked(false);
- onDisagree?.Invoke();
- }
- public void EnterUserAgreement() {
- GameObject o = GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/Views/AgreementView"));
- o.GetComponent<AgreementView>().EnterUserAgreement();
- }
- public void EnterPrivacyAgreement() {
- GameObject o = GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/Views/AgreementView"));
- o.GetComponent<AgreementView>().EnterPrivacyAgreement();
- }
- }
|