private void DispatchEvent(string type, LoadItem item) { ResourceManagerEventArgs eventArgs = App.objectPoolManager.GetObject <ResourceManagerEventArgs>(); eventArgs.type = type; eventArgs.loadItem = item; DispatchEvent(eventArgs); App.objectPoolManager.ReleaseObject(eventArgs); }
private void DispatchEvent(string type, LoadQueue queue) { ResourceManagerEventArgs eventArgs = App.objectPoolManager.GetObject <ResourceManagerEventArgs>(); eventArgs.type = type; eventArgs.loadQueue = queue; App.resourceManager.DispatchEvent(eventArgs); App.objectPoolManager.ReleaseObject(eventArgs); }