Пример #1
0
    public void OnLogin()
    {
        Conection con    = gameObject.AddComponent <Conection>();
        string    nombre = user.text;
        string    pass   = passw.text;

        if (IsValidEmail(nombre))
        {
            LoginCanvas.SetActive(false);
            LoadingCanvas.SetActive(true);
            DataClass.usr = new User(nombre, pass);
            if (cb.isOn)
            {
                PlayerPrefs.SetString("Mail", user.text);
                PlayerPrefs.SetString("Pass", passw.text);
            }
            con.FunctionSN("login");
        }
        else
        {
            Err.SetActive(true);
        }
    }