DisConnectedCompnentSystem.cs 869 B

1234567891011121314151617181920212223242526272829303132333435
  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. ViewManager.Hide<GuideView>();
  15. Alert.Show("服务器连接已断开!")
  16. .SetLeftButton(true, "返回登录", (obj) =>
  17. {
  18. GameController.QuitToLoginView(false);
  19. });
  20. }
  21. self.showAlert = true;
  22. }
  23. }
  24. public static class DisConnectedCompnentSystem
  25. {
  26. public static void CancelAlert(this DisConnectedCompnent self)
  27. {
  28. self.showAlert = false;
  29. }
  30. }
  31. }