using asap.core; using UnityEngine; using System.Threading.Tasks; using GameCore; using UnityEngine.AddressableAssets; public class EventCanAct : AGameAct { public static IEventAggregator EventAggregator = new EventAggregator(); public static EventCanParamsCtrl ParamsCtrl; public static EventCanSystem CanSystem; // public static EventCanChainPackData ChainPackData; public static string ActAddressable = "EventCanAct"; public override async Task StartAsync() { Debug.Log("Enter EventCanAct."); ParamsCtrl = (EventCanParamsCtrl)await Addressables.LoadAssetAsync("EventCanParamsCtrl").Task; GContext.container.Resolve().Reset(); CanSystem = new EventCanSystem(); await UIManager.Instance.ShowUILoad(UITypes.EventCanPanel); if (!GContext.container.Resolve().HasFootPrint(EFootPrint.IsEventCanGuidePoped)) { await UIManager.Instance.ShowUINotLoading(UITypes.EventCanInfoPanel); GContext.container.Resolve().UpdateFootPrint(EFootPrint.IsEventCanGuidePoped); } return await base.StartAsync(); } protected override void OnDestroy() { UIManager.Instance.DestroyUI(UITypes.EventCanPanel); // GContext.container.Resolve().Flush(); Debug.Log("Exit EventCanAct."); } }