using ET; using ET.EventType; namespace ET { public class NetLoadingEvent { private static bool isShowing; public class PlayNetLoadingEvent : AEvent_Sync { private FUI_NetLoading ui; public override void Run(PlayNetLoading a) { if (isShowing) return; if (ui == null) { ui = FUI_NetLoading.CreateInstance(FUIComponent.Instance); ui.Name = FUIPackage.Common_NetLoading; ui.self.sortingOrder = 9999; ui.MakeFullScreen(); } isShowing = true; FUIComponent.Instance.Add(ui, true); } } public class StopNetLoadngEvent : AEvent_Sync { public override void Run(StopNetLoading a) { isShowing = false; FUIComponent.Instance.Get(FUIPackage.Common_NetLoading)?.RemoveSelfNoDispose(); } } } }