|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using GFGGame;
|
|
|
+using UnityEngine;
|
|
|
|
|
|
namespace ET
|
|
|
{
|
|
@@ -15,13 +16,27 @@ namespace ET
|
|
|
{
|
|
|
if(GameGlobal.zoneScene.GetComponent<SessionComponent>().SessionState == SessionState.Gate)
|
|
|
{
|
|
|
- LoginController.ReqReConnectGate().Coroutine();
|
|
|
+
|
|
|
+ if (!Application.isFocused)
|
|
|
+ {
|
|
|
+ AlertSystem.Show("连接已断开。")
|
|
|
+ .SetRightButton(true, "重新连接", (object data) =>
|
|
|
+ {
|
|
|
+ LoginController.ReqReConnectGate().Coroutine();
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ LoginController.ReqReConnectGate().Coroutine();
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
GameController.QuitToLoginView(false);
|
|
|
}
|
|
|
}
|
|
|
+ //重置状态
|
|
|
self.ToReconnect = true;
|
|
|
}
|
|
|
}
|