1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using UnityEngine;
- using UnityEngine.UI;
- using DG.Tweening;
- using TMPro;
- public class LoginPassWordManager : MonoSingleton<LoginPassWordManager>
- {
- public TextMeshProUGUI nameText;
- public GameObject errorGo;
- int MAXINPUT = 8;
- public TMP_InputField tmpField;
- public GameObject passWordGo;
- public GameObject iconGo;
- private void OnEnable()
- {
- errorGo.SetActive(false);
- passWordGo.SetActive(false);
- try
- {
- UserManager.Instance.MoveIcon(Vector3.zero, iconGo.transform, ()=> {
- nameText.text = UserManager.Instance.NowChoose.name;
- passWordGo.SetActive(true);
- });
- }
- catch
- {
- }
- }
- public void toError()
- {
- errorGo.SetActive(true);
- tmpField.transform.DOShakePosition(0.5f,2);
- }
- public void GoBack()
- {
- LoginWindowsManager.Instance.gotologin();
- }
- public void setNum(string num)
- {
- errorGo.SetActive(false);
- if (num!="R"&& num != "")
- {
- if(tmpField.text.Length<= MAXINPUT)
- {
- tmpField.text = tmpField.text + num;
- }
- }else if(num == "R")
- {
- if (tmpField.text.Length > 0)
- tmpField.text = tmpField.text.Remove(tmpField.text.Length - 1);
- }
- }
- }
|