Esempio n. 1
0
        public void SetPreload(int totalAmount, int onceAmount, PreloadComplete callback = null)
        {
            preloadTotalAmount = totalAmount;
            preloadOnceAmount  = onceAmount;

            preloadCompleteCallback = callback;
        }
Esempio n. 2
0
        internal void DoUpdate(float deltaTime, float unscaleDeltaTime)
        {
            //preload
            if (preloadTotalAmount > 0)
            {
                PreloadItem();
            }
            else if (preloadCompleteCallback != null)
            {
                preloadCompleteCallback.Invoke(categoryName, assetPath);
                preloadCompleteCallback = null;
            }

            //cull
            if (isCullEnable && cullDelayTime > 0)
            {
                preCullTime += unscaleDeltaTime;
                if (preCullTime >= cullDelayTime)
                {
                    Cull();
                    preCullTime = 0.0f;
                }
            }
        }