public icMediaLoader(int concurrentLoads, bool useBink)
        {
            this.threadedLoader = new LoadingManager();
            this.threadedLoader.MaxConcurrentLoads = concurrentLoads;

            if (firstInstance == null)
            firstInstance = this;
        }
Example #2
0
        public icMediaLoader(int concurrentLoads, bool useBink)
        {
            this.threadedLoader = new LoadingManager();
            this.threadedLoader.MaxConcurrentLoads = concurrentLoads;

            if (firstInstance == null)
            {
                firstInstance = this;
            }
        }
        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
        }
Example #4
0
        public void LoadMyself()
        {
            icMediaLoader mediaLoader = ToolbeltManager.FirstInstance.SoundLoader;

            mediaLoader.CreateOggSoundMaterial(this.filePath, this.gameObject);
        }
        public override void LoadMyself()
        {
            icMediaLoader mediaLoader = ToolbeltManager.FirstInstance.MediaLoader;

            mediaLoader.CreateImageMaterial(this.filePath, this.gameObject);
        }
        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
        }