Exemplo n.º 1
0
 //单机版
 private void OnClick()
 {
     if (user.text == "admin" && password.text == "123456")
     {
         Addressables.LoadSceneAsync("TabelDemo");
         Hide();
     }
     else
     {
         tip.text = "用户名或密码错误!";
         StopCoroutine(SuperTool.Delay(1, () => tip.text  = ""));
         StartCoroutine(SuperTool.Delay(1, () => tip.text = ""));
     }
 }
Exemplo n.º 2
0
    IEnumerator LoadUI()
    {
        UI.Instance.loadUI();//首先执行loadUI,先把ui资源加载进来
        while (true)
        {
            yield return(0);

            if (UI.Instance.loadFinshed)
            {
                break;
            }
        }
        Proxy.InitAsset();//实例化已经加载到内存中的ui资源

        StartCoroutine(SuperTool.Delay(1, () => Proxy.LoginProxy.Show()));
    }