コード例 #1
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);
        }
コード例 #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);
        }
コード例 #3
0
        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
        }
コード例 #4
0
        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
        }
コード例 #5
0
 public ImageLoaderObject(string filePath, LoadingManager threadedLoader)
     : base(filePath, threadedLoader)
 {
     imageCacher = icImageCacher.FirstInstance;
 }
コード例 #6
0
 public ImageLoaderObject(string filePath, LoadingManager threadedLoader)
     : base(filePath, threadedLoader)
 {
     imageCacher = icImageCacher.FirstInstance;
 }