12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class ChangeLoginPopup : ScreenBase
- {
- public GameObject ParentAndroid;
- public GameObject ParentIos;
- // Start is called before the first frame update
- void Start()
- {
- #if UNITY_ANDROID
- ParentAndroid.SetActive(true);
- #endif
- #if UNITY_IOS
- ParentIos.SetActive(true);
- #endif
- if (PlayerPrefs.GetInt("ErrorLogin") == 0)
- {
- PlayerPrefs.DeleteAll();
- PlayerPrefs.SetInt("ErrorLogin",1);
- PlayerPrefs.Save();
- }
- }
- // Update is called once per frame
- public void OnLoginFB()
- {
- WrapperFB.Login();
- }
- public void OnLoginGuest()
- {
- PlayerPrefs.SetInt("GUEST", 1);
- PlayerPrefs.Save();
- }
- void OnDestroy()
- {
- PlayerPrefs.SetInt("GUEST", 0);
- PlayerPrefs.Save();
- }
- }
|