Advertisement
Guest User

Untitled

a guest
Jan 6th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1.    public void CheckUser ()
  2.     {
  3.         bool correctUsername = false;
  4.         bool correctPassword = false;
  5.  
  6.  
  7.         XmlReader reader = XmlReader.Create("C:\\Users\\Lotus\\Documents\\GitHub\\BarrenMusicFestival\\User1.xml");
  8.         while (reader.Read())
  9.         {
  10.             if (reader.Name == "User1")
  11.             {
  12.                 if (GameObject.Find("EnterUsernameInlog").GetComponent<UsernameScript>().InputUsername() == reader.GetAttribute("name"))
  13.                 {
  14.                     correctUsername = true;
  15.                 }
  16.  
  17.             }
  18.             if (reader.Name == "Password")
  19.             {
  20.                 if (GameObject.Find("EnterPasswordInlog").GetComponent<UsernameScript>().InputUsername() == reader.GetAttribute("pass"))
  21.                 {
  22.                     correctPassword = true;
  23.                 }
  24.             }
  25.             if (correctUsername && correctPassword)
  26.             {
  27.                 //do login thing
  28.  
  29.             }
  30.  
  31.         }
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement