| | |
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.SceneManagement;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | |
|
| | |
| | | {
|
| | | [SerializeField] Text m_Content;
|
| | | [SerializeField] Button m_Confirm;
|
| | | [SerializeField] Button m_Cancel;
|
| | |
|
| | | #region Built-in
|
| | |
|
| | | protected override void InitComponent()
|
| | | {
|
| | | m_Cancel.AddListener(Cancel);
|
| | | m_Confirm.AddListener(Confirm);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void Confirm()
|
| | | {
|
| | | switch (Application.internetReachability)
|
| | | {
|
| | | case NetworkReachability.NotReachable:
|
| | | GameNetSystem.Instance.LoginOut();
|
| | | ServerForceExitHintWin.reason = 111;
|
| | | break;
|
| | | case NetworkReachability.ReachableViaCarrierDataNetwork:
|
| | | case NetworkReachability.ReachableViaLocalAreaNetwork:
|
| | | if (StageManager.Instance.currentStage == StageName.Login)
|
| | | {
|
| | | LoginManager.Instance.busy = false;
|
| | | LoginManager.Instance.AccountLogin(LoginManager.Instance.accountBuf, LoginManager.Instance.ipBuf,
|
| | | LoginManager.Instance.portBuf, LoginManager.Instance.gamePortBuf);
|
| | | }
|
| | | else
|
| | | {
|
| | | GameNetSystem.Instance.Reconnect();
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | CloseWindow();
|
| | | }
|
| | |
|
| | | private void Cancel()
|
| | | {
|
| | | if (!(StageManager.Instance.currentStage == StageName.Login))
|
| | | {
|
| | | GameNetSystem.Instance.LoginOut();
|
| | |
| | | CloseWindow();
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | |
|