修改改变登录方式按钮的无需点击上升bug

This commit is contained in:
huyulong 2024-11-16 16:06:26 +08:00
parent c2de8bb082
commit 2a64f2c02c

View File

@ -39,6 +39,9 @@ public class logoPanel : MonoBehaviour
public delegate void TokenReceivedDelegate(string token); public delegate void TokenReceivedDelegate(string token);
public static event TokenReceivedDelegate OnTokenReceived; public static event TokenReceivedDelegate OnTokenReceived;
private bool isOpenYzm = true;
private bool isOpenPwd = false;
void Start() void Start()
{ {
yzmBtn.onClick.AddListener(OnClickYzmBtn); yzmBtn.onClick.AddListener(OnClickYzmBtn);
@ -120,18 +123,30 @@ public class logoPanel : MonoBehaviour
private void OnClickYzmBtn() private void OnClickYzmBtn()
{ {
if(isOpenYzm)
{
return;
}
pwdBtn.transform.position -= new Vector3(0f, 26.4f, 0f); pwdBtn.transform.position -= new Vector3(0f, 26.4f, 0f);
yzmBtn.transform.position += new Vector3(0f, 26.4f, 0f); yzmBtn.transform.position += new Vector3(0f, 26.4f, 0f);
yzm.gameObject.SetActive(true); yzm.gameObject.SetActive(true);
mm.gameObject.SetActive(false); mm.gameObject.SetActive(false);
isOpenYzm = true;
isOpenPwd = false;
} }
private void OnClickPwdBtn() private void OnClickPwdBtn()
{ {
if (isOpenPwd)
{
return;
}
pwdBtn.transform.position += new Vector3(0f, 26.4f, 0f); pwdBtn.transform.position += new Vector3(0f, 26.4f, 0f);
yzmBtn.transform.position -= new Vector3(0f, 26.4f, 0f); yzmBtn.transform.position -= new Vector3(0f, 26.4f, 0f);
yzm.gameObject.SetActive(false); yzm.gameObject.SetActive(false);
mm.gameObject.SetActive(true); mm.gameObject.SetActive(true);
isOpenPwd = true;
isOpenYzm = false;
} }
// ·þÎñÆ÷·µ»ØµÄÊý¾Ý½á¹¹ // ·þÎñÆ÷·µ»ØµÄÊý¾Ý½á¹¹