Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using UnityEngine.UI;
- public class login : MonoBehaviour {
- private InputField input,input2;
- // Use this for initialization
- void Start () {
- input = GameObject.Find ("login").GetComponentInChildren<InputField> ();
- input2 = GameObject.Find ("senha").GetComponentInChildren<InputField>();
- }
- // Update is called once per frame
- void Update () {
- if(input.text == "microlinsrio" && input2.text == "microlinsrio2016"){
- Debug.Log("Logou");
- }
- if (input.text != "microlinsrio" && input2.text != "microlinsrio2016" && !string.IsNullOrEmpty(input.text) && !string.IsNullOrEmpty(input2.text)) {
- Debug.Log ("Senha e login incorreto");
- }
- if (input.text != "microlinsrio" && input2.text == "microlinsrio2016" && !string.IsNullOrEmpty(input.text) && !string.IsNullOrEmpty(input2.text)) {
- Debug.Log ("Login incorreto");
- }
- if (input.text == "microlinsrio" && input2.text != "microlinsrio2016" && !string.IsNullOrEmpty(input.text) && !string.IsNullOrEmpty(input2.text)) {
- Debug.Log ("Senha incorreto");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement