Пример #1
0
        private void InitLoadingScreen()
        {
            /* final */
            ITextureSource loadingScreenTextureSource = this.mEngineOptions.GetLoadingScreenTextureSource();
            /* final */
            Texture loadingScreenTexture = TextureFactory.CreateForTextureSourceSize(loadingScreenTextureSource);
            /* final */
            TextureRegion loadingScreenTextureRegion = TextureRegionFactory.CreateFromSource(loadingScreenTexture, loadingScreenTextureSource, 0, 0);

            this.SetScene(new SplashScene(this.GetCamera(), loadingScreenTextureRegion));
        }
Пример #2
0
        public Engine(/* final */ EngineOptions pEngineOptions)
        {
            Engine.Instance = this;

            //TextureRegionFactory.setAssetBasePath("");
            TextureRegionFactory.SetAssetBasePath("");
            //SoundFactory.setAssetBasePath("");
            SoundFactory.SetAssetBasePath("");
            //MusicFactory.setAssetBasePath("");
            MusicFactory.SetAssetBasePath("");
            //FontFactory.setAssetBasePath("");
            FontFactory.setAssetBasePath("");

            //BufferObjectManager.setActiveInstance(this.mBufferObjectManager);
            BufferObjectManager.SetActiveInstance(this.mBufferObjectManager);

            this.mEngineOptions = pEngineOptions;
            //this.SetTouchController(new SingleTouchController());
            this.TouchController = new SingleTouchController();
            //this.mCamera = pEngineOptions.getCamera();
            this.mCamera = pEngineOptions.GetCamera();

            if (this.mEngineOptions.NeedsSound())
            {
                this.mSoundManager = new SoundManager();
            }

            if (this.mEngineOptions.NeedsMusic())
            {
                this.mMusicManager = new MusicManager();
            }

            if (this.mEngineOptions.HasLoadingScreen())
            {
                this.InitLoadingScreen();
            }

            this.mUpdateThread.Start();
        }