Ejemplo n.º 1
0
        /// <summary>
        /// Draw method for when the game is in the playing state.
        /// </summary>
        /// <param name="gameTime"></param>
        void DrawPlaying(GameTime gameTime)
        {
            /* Draw world elements */
            WorldSpriteBatch.Begin(SpriteSortMode.Deferred,
                                   null, SamplerState.PointClamp, null, null, null, Camera.GetTransformation());

            DrawMap();
            double time = gameTime.ElapsedGameTime.TotalSeconds;

            DrawGameplayObjects();

            if (ActivePlayer.IsPlacingTower)
            {
                DrawPendingTower();
            }
            WorldSpriteBatch.End();

            /* Draw effect elements */
            BoltSpriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, Camera.Transform);
            foreach (Bolt e in Effects)
            {
                e.Draw(BoltSpriteBatch);
            }
            BoltSpriteBatch.End();

            /* Draw UI elements */
            ActivePlayer.DrawUI();
            DrawDebug();
        }