예제 #1
0
    public void LoginError(int choice) // 1=wrong username, 2=wrong password, 3=username taken
    {
        switch (choice)
        {
        case 1:
            UserLength.SetActive(false);
            PassLength.SetActive(false);
            InvPass.SetActive(false);
            TakenUser.SetActive(false);
            InvUser.SetActive(true);
            break;

        case 2:
            UserLength.SetActive(false);
            PassLength.SetActive(false);
            InvUser.SetActive(false);
            TakenUser.SetActive(false);
            InvPass.SetActive(true);
            break;

        case 3:
            UserLength.SetActive(false);
            PassLength.SetActive(false);
            InvPass.SetActive(false);
            InvUser.SetActive(false);
            TakenUser.SetActive(true);
            break;

        default:
            Debug.Log("Invalid Error code");
            break;
        }
    }
예제 #2
0
 public void TryLogin()
 {
     if (user.text.Length < 1)
     {
         PassLength.SetActive(false);
         InvPass.SetActive(false);
         TakenUser.SetActive(false);
         InvUser.SetActive(false);
         UserLength.SetActive(true);
         return;
     }
     if (pass.text.Length < 1)
     {
         UserLength.SetActive(false);
         InvPass.SetActive(false);
         TakenUser.SetActive(false);
         InvUser.SetActive(false);
         PassLength.SetActive(true);
         return;
     }
     client.Login(user.text, pass.text);
 }