Exemplo n.º 1
0
        public void UserSignUp()
        {
            if (!IsValidEmail.IsValidmail(email.text))
            {
                ErrorOutPut(LocalisationSystem.GetLocalisedValue("email_error"));
            }
            else
            {
                if (username.text.Length < 4 || !CreateRGX(username.text).IsMatch(username.text))
                {
                    ErrorOutPut(LocalisationSystem.GetLocalisedValue("username_error"));
                }
                else
                {
                    if (displayName.text.Length < 4 || !CreateRGX(displayName.text).IsMatch(displayName.text))
                    {
                        ErrorOutPut(LocalisationSystem.GetLocalisedValue("displayname_error"));
                    }
                    else
                    {
                        if (password.text.Length < 8 || !CreateRGX(password.text).IsMatch(password.text))
                        {
                            ErrorOutPut(LocalisationSystem.GetLocalisedValue("password_error"));
                        }
                        else
                        {
                            ErrorOutPut("");
                            EventManager.StartListening <string>("OnSignUpResponse", OnSignUpResponse);

                            GS_Authentication.SignUp(username.text, displayName.text, password.text, email.text, "OnSignUpResponse");
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
 public void UserLogin()
 {
     EventManager.StartListening <string>("OnLoginResponse", OnLoginResponse);
     DataController.SaveValue("username", username.text);
     DataController.SaveValue("password", password.text);
     GS_Authentication.Login(username.text, password.text, "OnLoginResponse");
 }
Exemplo n.º 3
0
        public void GuestLogin()
        {
            Warning.SetActive(true);

            EventManager.StartListening <string>("OnGuestLoginResponse", OnGuestLoginResponse);

            GS_Authentication.DeviceAuthentication("OnGuestLoginResponse");
        }
Exemplo n.º 4
0
        public void UserLogin()
        {
            EventManager.StartListening <string>("OnLoginResponse", OnLoginResponse);

            GS_Authentication.Login(username.text, password.text, "OnLoginResponse");
        }
Exemplo n.º 5
0
        public void UserSignUp()
        {
            EventManager.StartListening <string>("OnSignUpResponse", OnSignUpResponse);

            GS_Authentication.SignUp(username.text, displayName.text, password.text, email.text, "OnSignUpResponse");
        }