OnNetClosedUI.cs 528 B

12345678910111213141516171819
  1. using ET.Client;
  2. using ET.EventType;
  3. using ET;
  4. [Event]
  5. public class NetClosedEventHandler : BEvent<NetClosed>
  6. {
  7. protected override async ETTask OnEvent(NetClosed _)
  8. {
  9. await UICommonDialog1.Show("确认", "检测到网络连接断开", () => {
  10. EventSystem.Instance.Publish<ShowLoginUIEvent>();
  11. GlobalViewMgr.Instance.ReOpenGame();
  12. UnitMgr.Instance.RecycleUnits();
  13. BattleMgr.Instance.InitBattleLayer();
  14. BattleUnit.Reset();
  15. }, null);
  16. }
  17. }