// Update is called once per frame void Update() { Tab(); Enter(); AssignInputs(); isFocused = username.GetComponentInChildren<TMP_InputField>().isFocused || password.GetComponentInChildren<TMP_InputField>().isFocused || confirmPassword.GetComponentInChildren<TMP_InputField>().isFocused; if (AuthFuncs.CheckUsername(Username) && AuthFuncs.CheckSignupPassword(Password, ConfirmPassword)) { SignUpButton.interactable = true; } else { SignUpButton.interactable = false; } if (Username == "") { username.GetComponentInChildren<TextMeshProUGUI>().text = "Username"; GameObject.FindGameObjectWithTag("SignupUserLine").GetComponentInChildren<Image>().color = new Color(95 / 255f, 105 / 255f, 115 / 255f, 1f); GameObject.FindGameObjectWithTag("SignupPasswordLine").GetComponentInChildren<Image>().color = new Color(95 / 255f, 105 / 255f, 115 / 255f, 1f); GameObject.FindGameObjectWithTag("SignupCPasswordLine").GetComponentInChildren<Image>().color = new Color(95 / 255f, 105 / 255f, 115 / 255f, 1f); } if (Password == "") { password.GetComponentInChildren<TextMeshProUGUI>().text = "Password"; GameObject.FindGameObjectWithTag("SignupUserLine").GetComponentInChildren<Image>().color = new Color(95 / 255f, 105 / 255f, 115 / 255f, 1f); GameObject.FindGameObjectWithTag("SignupPasswordLine").GetComponentInChildren<Image>().color = new Color(95 / 255f, 105 / 255f, 115 / 255f, 1f); GameObject.FindGameObjectWithTag("SignupCPasswordLine").GetComponentInChildren<Image>().color = new Color(95 / 255f, 105 / 255f, 115 / 255f, 1f); } if (ConfirmPassword == "") { confirmPassword.GetComponentInChildren<TextMeshProUGUI>().text = "Confirm Password"; GameObject.FindGameObjectWithTag("SignupUserLine").GetComponentInChildren<Image>().color = new Color(95 / 255f, 105 / 255f, 115 / 255f, 1f); GameObject.FindGameObjectWithTag("SignupPasswordLine").GetComponentInChildren<Image>().color = new Color(95 / 255f, 105 / 255f, 115 / 255f, 1f); GameObject.FindGameObjectWithTag("SignupCPasswordLine").GetComponentInChildren<Image>().color = new Color(95 / 255f, 105 / 255f, 115 / 255f, 1f); } }
public void RegisterButton() { if (AuthFuncs.CheckUsername(Username) && AuthFuncs.CheckSignupPassword(Password, ConfirmPassword)) { Password = AuthFuncs.EncryptPassword(Password); StartCoroutine(Register("https://ecocitythegame.ca/sqlconnect/register.php")); } }