Пример #1
0
 public void LoginButton()
 {
     if (usernameIF.text != "" && passwordIF.text != "")
     {
         string     name     = usernameIF.text;
         string     password = passwordIF.text;
         WWWManager login    = new WWWManager();
         if (login.CheckNamePassword(name, password))
         {
             hintText.text     = "正确";
             UserInfo.userName = name;
             //UserInfo.userInfo.userName = name;
             Debug.Log(UserInfo.userName);
             StartCoroutine(LoadScene());
         }
         else
         {
             hintText.text = "账号或密码错误!";
             StartCoroutine(OkTextDelay());
         }
     }
     else
     {
         hintText.text = "账号或密码为空";
         StartCoroutine(OkTextDelay());
         Debug.Log("账号或密码为空!");
     }
 }