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("Prefabs/Views/AgreementView")); o.GetComponent().EnterUserAgreement(); } public void EnterPrivacyAgreement() { GameObject o = GameObject.Instantiate(Resources.Load("Prefabs/Views/AgreementView")); o.GetComponent().EnterPrivacyAgreement(); } }