Пример #1
0
        /// <summary>
        /// Carrega os gráficos e sons do game
        /// </summary>
        public override void LoadContent()
        {
            // Se o gerenciador de conteúdo for nulo
            if (this.content == null)
            {
                // Inicializa o gerenciador de conteúdo
                this.content = new ContentManager(this.ScreenManager.Game.Services, "Content");
            }

            var device = this.ScreenManager.GraphicsDevice;
            this.render = new RenderTarget2D(device, device.Viewport.Width, device.Viewport.Height,
                false, SurfaceFormat.Color, DepthFormat.Depth24);
            this.postProcessingEffect = this.content.Load<Effect>("PostProcessing/Dark");

            // Inicializa a câmera
            this.camera = new Camera2D(this.ScreenManager.GraphicsDevice.Viewport);

            // TODO: Carregar o som de início
            //this.startSound = this.content.Load<SoundEffect>("Sounds/???");
            //this.startSound.Play();

            // Carrega a primeira fase
            this.LoadNextLevel();

            // Após o carregamento ter terminado, reinicia o tempo decorrido no game
            this.ScreenManager.Game.ResetElapsedTime();
        }
Пример #2
0
        /// <summary>
        /// Carrega os gráficos e sons do game
        /// </summary>
        public override void LoadContent()
        {
            // Se o gerenciador de conteúdo for nulo
            if (this.content == null)
            {
                // Inicializa o gerenciador de conteúdo
                this.content = new ContentManager(this.ScreenManager.Game.Services, "Content");
            }

            // Inicializa a câmera
            this.camera = new Camera2D(this.ScreenManager.GraphicsDevice.Viewport);

            // TODO: Carregar o som de início
            //this.startSound = this.content.Load<SoundEffect>("Sounds/???");
            //this.startSound.Play();

            // Carrega a primeira fase
            this.LoadNextLevel();

            // Após o carregamento ter terminado, reinicia o tempo decorrido no game
            this.ScreenManager.Game.ResetElapsedTime();
        }