public icImageCacher(int cacheSizeMB, float graceTime)
        {
            Debug.Log ("Starting image cacher with " + cacheSizeMB + "MB");
            if (firstInstance == null) {
            firstInstance = this;
            }

            this.cacheSizeMB = Mathf.Max(0, cacheSizeMB);
            this.graceTime = Mathf.Max(0, graceTime);
        }
Beispiel #2
0
        public icImageCacher(int cacheSizeMB, float graceTime)
        {
            Debug.Log("Starting image cacher with " + cacheSizeMB + "MB");
            if (firstInstance == null)
            {
                firstInstance = this;
            }

            this.cacheSizeMB = Mathf.Max(0, cacheSizeMB);
            this.graceTime   = Mathf.Max(0, graceTime);
        }
        void Awake()
        {
            this.PreAwakeSubclass();
            // The first ToolbeltManager to start up will be stored
            if (instance == null)
            {
                instance         = this;
                this.mediaLoader = new icMediaLoader(this.concurrentMediaLoads, useBink);
                this.soundLoader = new icMediaLoader(this.concurrentMediaLoads, false);
                if (imageCacheMBs > 0)
                {
                    imageCacher = new icImageCacher(imageCacheMBs, imageCacheGraceTime);
                }

                this.assignUniqueID(ToolbeltManager.GenerateUniqueID());
                this.ActivateSceneParent();
            }
            this.AwakeSubclass();
            // TODO: don't initialise singletons if being loaded by another scene
            // Scene loading code should look for ToolbeltManager and set
            // parameters appropriately
        }
        void Awake()
        {
            this.PreAwakeSubclass();
            // The first ToolbeltManager to start up will be stored
            if (instance == null) {
                instance = this;
                this.mediaLoader = new icMediaLoader(this.concurrentMediaLoads, useBink);
                this.soundLoader = new icMediaLoader(this.concurrentMediaLoads, false);
                if (imageCacheMBs > 0)
                    imageCacher = new icImageCacher(imageCacheMBs, imageCacheGraceTime);

                this.assignUniqueID(ToolbeltManager.GenerateUniqueID());
                this.ActivateSceneParent();

            }
            this.AwakeSubclass();
            // TODO: don't initialise singletons if being loaded by another scene
            // Scene loading code should look for ToolbeltManager and set
            // parameters appropriately
        }
 public ImageLoaderObject(string filePath, LoadingManager threadedLoader)
     : base(filePath, threadedLoader)
 {
     imageCacher = icImageCacher.FirstInstance;
 }
Beispiel #6
0
 public ImageLoaderObject(string filePath, LoadingManager threadedLoader)
     : base(filePath, threadedLoader)
 {
     imageCacher = icImageCacher.FirstInstance;
 }