Esempio n. 1
0
        private void Awake()
        {
            Instance = this;
            HasShow  = true;
            name     = GetInput("AccountInput");
#if UNITY_ANDROID && !UNITY_EDITOR
            if (PlatformSdkManager.Instance.UserName == "0")
            {
                name.value = "";
            }
            else
            {
                name.value = PlatformSdkManager.Instance.UserName;
            }
            name.enabled          = false;
            name.collider.enabled = false;
#endif



            SetCallback("EnterGame", EnterGame);

#if UNITY_ANDROID && !UNITY_EDITOR
            SetCallback("SwitchAccount", PlatformSdkManager.Instance.SwitchUser);
            SetCallback("AccountInfo", PlatformSdkManager.Instance.ShowUserCenter);
            SetCallback("CallCenter", PlatformSdkManager.Instance.ShowCallCenter);
#else
#endif

            GetName("SwitchAccount").SetActive(false);
            GetName("AccountInfo").SetActive(false);
            GetName("CallCenter").SetActive(false);

            if (NetDebug.netDebug.TestAndroid)
            {
                name.value   = "123";
                name.enabled = true;
                name.GetComponent <Collider>().enabled = true;
            }

            if (NetDebug.netDebug.IsTest)
            {
                var rid = Random.Range(0, 999);
                name.value = "" + rid;
                EnterGame();
            }
        }
Esempio n. 2
0
 private void OnDestory()
 {
     Instance = null;
 }