protected override void OnShow(object data) { m_label_version.text = "当前版本号: " + Game.Upgrade.Instance().version; if (data != null && data is ShowUIEnum) { ShowUIEnum uiEnum = (ShowUIEnum)data; ShowLoginUI(uiEnum); } else { ShowLoginUI(ShowUIEnum.LoginAccout); } }
private void ShowLoginUI(ShowUIEnum type) { //登陆平台 //账号登陆 bool visible = ((type != ShowUIEnum.StartGame) && !DataManager.Manager <LoginDataManager>().IsSDKLogin); if (null != m_trans_loginAccount && m_trans_loginAccount.gameObject.activeSelf != visible) { m_trans_loginAccount.gameObject.SetActive(visible); } if (visible) { m_input_accunt.value = DataManager.Manager <LoginDataManager>().Acount; } //登陆游戏服 visible = !visible; if (null != m_trans_loginServer && m_trans_loginServer.gameObject.activeSelf != visible) { m_trans_loginServer.gameObject.SetActive(visible); } if (visible) { visible = (type == ShowUIEnum.StartGame); if (null != m_sprite_ZoneInfoContent && m_sprite_ZoneInfoContent.gameObject.activeSelf != visible) { m_sprite_ZoneInfoContent.gameObject.SetActive(visible); } if (visible) { InitZone(); } visible = (type != ShowUIEnum.None); if (null != m_btn_btnStartGame && m_btn_btnStartGame.gameObject.activeSelf != visible) { m_btn_btnStartGame.gameObject.SetActive(visible); } } visible = (type == ShowUIEnum.StartGame) && !DataManager.Manager <LoginDataManager>().IsSDKLogin; //返回按钮 if (null != m_btn_btnback && m_btn_btnback.gameObject.activeSelf != visible) { m_btn_btnback.gameObject.SetActive(visible); } visible = (type != ShowUIEnum.Authorize); if (null != m_btn_btnNotice && m_btn_btnNotice.gameObject.activeSelf != visible) { m_btn_btnNotice.gameObject.SetActive(visible); } visible = (type != ShowUIEnum.Authorize); if (null != m_btn_btnAccount && m_btn_btnAccount.gameObject.activeSelf != visible) { m_btn_btnAccount.gameObject.SetActive(visible); } StartCoroutine(RfreshLogin()); }