Пример #1
0
        private BaseLoadInfo ResourceLoadImp(string path)
        {
            BaseLoadInfo info = new ResourceLoadInfo();

            if (!info.Load(path))
            {
                return(null);
            }

            resourceObjects.Add(path, info);
            return(info);
        }
Пример #2
0
        private BaseLoadInfo ResourceLoadAsyncImp(string path, OnLoadEnd onLoadEnd)
        {
            BaseLoadInfo info = new ResourceLoadInfo();

            resourceObjects.Add(path, info);
            info.LoadAsync(path, loadInfo =>
            {
                if (loadInfo == null)
                {
                    return;
                }
                if (onLoadEnd != null)
                {
                    onLoadEnd(loadInfo);
                }
            });
            return(info);
        }