Exemplo n.º 1
0
        /// <summary>
        /// Draws the gameplay screen.
        /// </summary>
        public override void Draw(GameTime gameTime)
        {
            // This game has a blue background. Why? Because!
            //ScreenManager.GraphicsDevice.Clear(ClearOptions.Target, Color.CornflowerBlue, 0, 0);

            // Our player and enemy are both actually just text strings.
            SpriteBatch spriteBatch = ScreenManager.SpriteBatch;

            spriteBatch.Begin();
            wheel.Draw(spriteBatch);
            spriteBatch.Draw(arrow, new Vector2(499 - arrow.Width / 2, -10), Color.White);
            foreach (TextureButton tb in tabButtons)
            {
                tb.Draw(spriteBatch);
            }

            foreach (TextureButton tb in buttons)
            {
                tb.Draw(spriteBatch);
            }

            /* Draw Score */
            spriteBatch.DrawString(font, "Skor Pemain 1:\n" + skorPlayer1.ToString(), new Vector2(10, 0), Color.White);
            spriteBatch.DrawString(font, "Skor Pemain 2:\n" + skorPlayer2.ToString(), new Vector2(10, 100), Color.White);
            spriteBatch.DrawString(font, "Skor Pemain 3:\n" + skorPlayer3.ToString(), new Vector2(10, 200), Color.White);

            spriteBatch.DrawString(font, wheel.choosenOption.ToString(), new Vector2(490, 0), Color.White);
            spriteBatch.End();

            // If the game is transitioning on or off, fade it out to black.
            if (TransitionPosition > 0 || pauseAlpha > 0)
            {
                float alpha = MathHelper.Lerp(1f - TransitionAlpha, 1f, pauseAlpha / 2);

                ScreenManager.FadeBackBufferToBlack(alpha);
            }
        }