|
@@ -6,20 +6,28 @@ using GFGGame;
|
|
|
|
|
|
namespace ET
|
|
|
{
|
|
|
+
|
|
|
public class DisConnectedCompnentDestroy : DestroySystem<DisConnectedCompnent>
|
|
|
{
|
|
|
public override void Destroy(DisConnectedCompnent self)
|
|
|
{
|
|
|
- Alert.Show("服务器连接已断开!")
|
|
|
- .SetLeftButton(true, "返回登录",(obj) =>
|
|
|
- {
|
|
|
- GameController.QuitToLoginView(false);
|
|
|
- });
|
|
|
+ if(self.showAlert)
|
|
|
+ {
|
|
|
+ Alert.Show("服务器连接已断开!")
|
|
|
+ .SetLeftButton(true, "返回登录", (obj) =>
|
|
|
+ {
|
|
|
+ GameController.QuitToLoginView(false);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ self.showAlert = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public static class DisConnectedCompnentSystem
|
|
|
{
|
|
|
-
|
|
|
+ public static void CancelAlert(this DisConnectedCompnent self)
|
|
|
+ {
|
|
|
+ self.showAlert = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|