diff --git a/TheStrongestSnail/Assets/Scripts/Login/UI/logoPanel.cs b/TheStrongestSnail/Assets/Scripts/Login/UI/logoPanel.cs index a4d75f7..37b797d 100644 --- a/TheStrongestSnail/Assets/Scripts/Login/UI/logoPanel.cs +++ b/TheStrongestSnail/Assets/Scripts/Login/UI/logoPanel.cs @@ -39,6 +39,9 @@ public class logoPanel : MonoBehaviour public delegate void TokenReceivedDelegate(string token); public static event TokenReceivedDelegate OnTokenReceived; + private bool isOpenYzm = true; + private bool isOpenPwd = false; + void Start() { yzmBtn.onClick.AddListener(OnClickYzmBtn); @@ -120,18 +123,30 @@ public class logoPanel : MonoBehaviour private void OnClickYzmBtn() { + if(isOpenYzm) + { + return; + } pwdBtn.transform.position -= new Vector3(0f, 26.4f, 0f); yzmBtn.transform.position += new Vector3(0f, 26.4f, 0f); yzm.gameObject.SetActive(true); mm.gameObject.SetActive(false); + isOpenYzm = true; + isOpenPwd = false; } private void OnClickPwdBtn() { + if (isOpenPwd) + { + return; + } pwdBtn.transform.position += new Vector3(0f, 26.4f, 0f); yzmBtn.transform.position -= new Vector3(0f, 26.4f, 0f); yzm.gameObject.SetActive(false); mm.gameObject.SetActive(true); + isOpenPwd = true; + isOpenYzm = false; } // 服务器返回的数据结构