///登录系统代码
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class Denglu : MonoBehaviour
{
public InputField txt1;
public InputField txt2;
public Text txt3;
public void onClick(string names)
{
if (txt1.text == "123" && txt2.text == "123")
{
SceneManager.LoadScene(names);
}
else if (txt1.text == "123")
{
txt3.text = "密码输入错误,请重新输入!";
}
else if (txt2.text == "123")
{
txt3.text = "用户名输入错误,请重新输入!";
}
else
{
txt3.text = "密码和用户名都输入错误,请重新输入!";
}
}
}
///退出代码
public void onTuichu()
{
Application.Quit(); //退出程序代码
}