public override IEnumerator Start() { Debug.Log("CScene Start"); //场景子窗口排序初始化 //App.Util.Global.DialogSortOrder = 0; //保存当前场景 App.Util.AppManager.CurrentScene = this; yield return(StartCoroutine(OnLoad(AppManager.CurrentSceneRequest))); App.Util.AppManager.CurrentSceneRequest = null; yield return(StartCoroutine(CConnectingDialog.ToShowAsync())); CConnectingDialog.ToClose(); }
public IEnumerator ToRegisterStart() { CConnectingDialog.ToShow(); yield return(this.StartCoroutine(AppInitialize.Initialize())); Request req = new Request(); System.Action callback = () => { loginWindow.SetActive(false); CConnectingDialog.ToClose(); }; req.Set("onLoadComplete", callback); AppManager.CurrentScene.StartCoroutine(Global.AppManager.ShowDialog(Util.Dialog.RegisterDialog, req)); }
public IEnumerator ToLoginStart(string accountStr, string passwordStr) { CConnectingDialog.ToShow(); yield return(StartCoroutine(Global.SUser.RequestLogin(accountStr, passwordStr))); Debug.LogError("Global.SUser.self=" + Global.SUser.self); if (Global.SUser.self == null) { CConnectingDialog.ToClose(); yield break; } yield return(this.StartCoroutine(AppInitialize.Initialize())); yield return(this.StartCoroutine(Global.SUser.RequestGet())); AppManager.LoadScene("Home", null); }
public IEnumerator ToSubmit(string accountText, string passwordText, string nameText) { SRegister sRegister = new SRegister(); yield return(this.StartCoroutine(sRegister.RequestInsert(accountText, passwordText, nameText))); if (sRegister.responseInsert.result) { CConnectingDialog.ToShow(); yield return(StartCoroutine(App.Util.Global.SUser.RequestLogin(account.text.Trim(), password.text.Trim()))); if (App.Util.Global.SUser.self == null) { CConnectingDialog.ToClose(); this.Close(); yield break; } yield return(StartCoroutine(Global.SUser.RequestGet())); //App.Util.LSharp.LSharpScript.Instance.UpdatePlayer(); AppManager.LoadScene("Home", null); } }