Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.UI;
  4. public class login : MonoBehaviour {
  5. private InputField input,input2;
  6.  
  7. // Use this for initialization
  8. void Start () {
  9. input = GameObject.Find ("login").GetComponentInChildren<InputField> ();
  10. input2 = GameObject.Find ("senha").GetComponentInChildren<InputField>();
  11.  
  12.  
  13. }
  14.  
  15. // Update is called once per frame
  16. void Update () {
  17.  
  18. if(input.text == "microlinsrio" && input2.text == "microlinsrio2016"){
  19. Debug.Log("Logou");
  20. }
  21. if (input.text != "microlinsrio" && input2.text != "microlinsrio2016" && !string.IsNullOrEmpty(input.text) && !string.IsNullOrEmpty(input2.text)) {
  22. Debug.Log ("Senha e login incorreto");
  23. }
  24. if (input.text != "microlinsrio" && input2.text == "microlinsrio2016" && !string.IsNullOrEmpty(input.text) && !string.IsNullOrEmpty(input2.text)) {
  25. Debug.Log ("Login incorreto");
  26. }
  27. if (input.text == "microlinsrio" && input2.text != "microlinsrio2016" && !string.IsNullOrEmpty(input.text) && !string.IsNullOrEmpty(input2.text)) {
  28. Debug.Log ("Senha incorreto");
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement