|
@@ -66,6 +66,7 @@ namespace GFGGame
|
|
UpdateServer(recentlyServerInfo);
|
|
UpdateServer(recentlyServerInfo);
|
|
_ui.m_btnStart.visible = false;
|
|
_ui.m_btnStart.visible = false;
|
|
_ui.m_btnTapLogin.visible = false;
|
|
_ui.m_btnTapLogin.visible = false;
|
|
|
|
+ _ui.m_btnLogout.visible = false;
|
|
InitLoginStatus(serverInfosComponent).Coroutine();
|
|
InitLoginStatus(serverInfosComponent).Coroutine();
|
|
EventAgent.AddEventListener(ConstMessage.SERVER_CHANGE, OnSeverChangeListener);
|
|
EventAgent.AddEventListener(ConstMessage.SERVER_CHANGE, OnSeverChangeListener);
|
|
EventAgent.AddEventListener(ConstMessage.LOGIN_SUCCESS, OnLoginSuccess);
|
|
EventAgent.AddEventListener(ConstMessage.LOGIN_SUCCESS, OnLoginSuccess);
|
|
@@ -114,8 +115,6 @@ namespace GFGGame
|
|
|
|
|
|
private void UpdateServer(ServerInfo info)
|
|
private void UpdateServer(ServerInfo info)
|
|
{
|
|
{
|
|
- //登录成功后更新注销按钮显示
|
|
|
|
- _ui.m_btnLogout.visible = GameGlobal.zoneScene.GetComponent<AccountInfoComponent>().IsLogin();
|
|
|
|
ServerInfosComponent serverInfosComponent = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>();
|
|
ServerInfosComponent serverInfosComponent = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>();
|
|
if (serverInfosComponent.ServerInfoList.Count == 0)
|
|
if (serverInfosComponent.ServerInfoList.Count == 0)
|
|
{
|
|
{
|
|
@@ -130,6 +129,7 @@ namespace GFGGame
|
|
|
|
|
|
private void OnLoginSuccess(EventContext context)
|
|
private void OnLoginSuccess(EventContext context)
|
|
{
|
|
{
|
|
|
|
+ _ui.m_btnLogout.visible = true;
|
|
_ui.m_btnStart.visible = true;
|
|
_ui.m_btnStart.visible = true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -145,7 +145,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
private void OnClickBtnNotice()
|
|
private void OnClickBtnNotice()
|
|
{
|
|
{
|
|
- if (NoticeDataManager.Instance.LastNoticeInfo.noticeId == 0)
|
|
|
|
|
|
+ if (NoticeDataManager.Instance.LastNoticeInfo == null || NoticeDataManager.Instance.LastNoticeInfo.noticeId == 0)
|
|
{
|
|
{
|
|
PromptController.Instance.ShowFloatTextPrompt("暂无公告发布");
|
|
PromptController.Instance.ShowFloatTextPrompt("暂无公告发布");
|
|
return;
|
|
return;
|