Example #1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // TODO: Add your drawing code here
            spriteBatch.Begin();

            //board tetriminos
            foreach (Tetrimino t in tetriminos)
            {
                t.Draw(spriteBatch);
            }

            //next tetrimino
            nextTetrimino.Draw(spriteBatch);

            //hold tetrimino
            if (holdTetrimino != null)
            {
                holdTetrimino.Draw(spriteBatch);
            }

            foreach (Boundary b in boundaries)
            {
                b.Draw(spriteBatch);
            }

            DrawText(spriteBatch);

            spriteBatch.End();

            base.Draw(gameTime);
        }