DisConnectedCompnentSystem.cs 820 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using GFGGame;
  6. namespace ET
  7. {
  8. public class DisConnectedCompnentDestroy : DestroySystem<DisConnectedCompnent>
  9. {
  10. public override void Destroy(DisConnectedCompnent self)
  11. {
  12. if(self.showAlert)
  13. {
  14. Alert.Show("服务器连接已断开!")
  15. .SetLeftButton(true, "返回登录", (obj) =>
  16. {
  17. GameController.QuitToLoginView(false);
  18. });
  19. }
  20. self.showAlert = true;
  21. }
  22. }
  23. public static class DisConnectedCompnentSystem
  24. {
  25. public static void CancelAlert(this DisConnectedCompnent self)
  26. {
  27. self.showAlert = false;
  28. }
  29. }
  30. }