Ejemplo n.º 1
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            // game rendering
            renderer.BeginLayer(0);


            stateManager.Draw(gameTime);

            base.Draw(gameTime);
            renderer.EndLayer();

            if (stateManager.CurrentState is Play)
            {
                renderer.BeginLayer(1);

                Play playState = (Play)(stateManager.CurrentState);

                /*    playState.FireEmit.Draw(renderer.SpriteBatch);
                 *  playState.SparkEmit.Draw(renderer.SpriteBatch);
                 *  playState.ChickenFire.Draw(renderer.SpriteBatch);*/
                renderer.EndLayer();

                renderer.BeginLayer(2);
                playState.DrawChars();
                renderer.EndLayer();
            }

            renderer.RenderAll(Color.Silver);
        }