public override void Init() { base.Init(); eventDispatchersPluginDictComponent = this.AddComponent <EventDispatchersPluginDictComponent>(null); resLoadComponent = this.AddComponent <ResLoadComponent>(null, new ResLoad()); coroutinePluginComponent = this.AddComponent <CoroutinePluginComponent>(null, new CoroutinePlugin(Main.instance)); pausableCoroutinePluginComponent = this.AddComponent <PausableCoroutinePluginComponent>(null, new PausableCoroutinePlugin(Main.instance)); dotweenPluginComponent = this.AddComponent <DOTweenPluginComponent>(null, new DOTweenPlugin()); timerManagerPluginComponent = this.AddComponent <TimerManagerPluginComponent>(null, new TimerManagerPlugin(timerManager)); graphicComponent = CreateGraphicComponent(); }
public void Destroy() { foreach (var keyValue1 in assetCatDict) { var assetCat = keyValue1.Key; foreach (var keyValue2 in assetCatDict[assetCat]) { var callbackCause = keyValue2.Key; resLoadComponent.CancelLoadCallback(assetCat, callbackCause.GetNullableKey()); } } assetCatDict.Clear(); resLoadComponent = null; }
protected override void _Destroy() { base._Destroy(); eventDispatchers.RemoveAllListeners(); resLoadComponent = null; coroutinePluginComponent = null; pausableCoroutinePluginComponent = null; timerManagerPluginComponent = null; graphicComponent = null; eventDispatchersPluginDictComponent = null; isAllAssetsLoadDone = false; allAssetsLoadDoneCallback = null; }
public ResLoadComponentPlugin(ResLoadComponent resLoadComponent) { this.resLoadComponent = resLoadComponent; }