using System; using System.Collections.Generic; using System.Linq; using System.Text; using GFGGame; namespace ET { public class DisConnectedCompnentDestroy : DestroySystem { public override void Destroy(DisConnectedCompnent self) { if (self.showAlert) { AlertSystem.Show("服务器连接已断开!") .SetLeftButton(true, "返回登录", (obj) => { GameController.QuitToLoginView(false); }); } self.showAlert = true; } } public static class DisConnectedCompnentSystem { public static void CancelAlert(this DisConnectedCompnent self) { self.showAlert = false; } } }