|
@@ -4,24 +4,25 @@ using UnityEngine;
|
|
|
|
|
|
|
|
public class AgreementPopup : MonoBehaviour
|
|
public class AgreementPopup : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
- // Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
void Start()
|
|
|
{
|
|
{
|
|
|
if (PlayerPrefs.GetInt("AgreementPopupChecked", 0) == 1) {
|
|
if (PlayerPrefs.GetInt("AgreementPopupChecked", 0) == 1) {
|
|
|
- Destroy(gameObject);
|
|
|
|
|
|
|
+ this.gameObject.SetActive(false);
|
|
|
LoginView.ins.SetAgreementChecked(true);
|
|
LoginView.ins.SetAgreementChecked(true);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void Agree() {
|
|
public void Agree() {
|
|
|
PlayerPrefs.SetInt("AgreementPopupChecked", 1);
|
|
PlayerPrefs.SetInt("AgreementPopupChecked", 1);
|
|
|
- Destroy(gameObject);
|
|
|
|
|
|
|
+ this.gameObject.SetActive(false);
|
|
|
LoginView.ins.SetAgreementChecked(true);
|
|
LoginView.ins.SetAgreementChecked(true);
|
|
|
}
|
|
}
|
|
|
|
|
+ [System.NonSerialized] public System.Action onDisagree;
|
|
|
public void Disagree() {
|
|
public void Disagree() {
|
|
|
PlayerPrefs.SetInt("AgreementPopupChecked", 0);
|
|
PlayerPrefs.SetInt("AgreementPopupChecked", 0);
|
|
|
- Destroy(gameObject);
|
|
|
|
|
|
|
+ this.gameObject.SetActive(false);
|
|
|
LoginView.ins.SetAgreementChecked(false);
|
|
LoginView.ins.SetAgreementChecked(false);
|
|
|
|
|
+ onDisagree?.Invoke();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void EnterUserAgreement() {
|
|
public void EnterUserAgreement() {
|