Ejemplo n.º 1
0
        /* Redrawing the form
         */
        private void FormMenu_Paint(object sender, PaintEventArgs e)
        {
            Graphics graphics = this.CreateGraphics();

            decorativePawn.Draw(graphics);
            decorativeKing.Draw(graphics);
            for (int i = 0; i < 4; i++)
            {
                decorativeBoardCell[i].Draw(graphics);
            }
        }
Ejemplo n.º 2
0
        public new void Draw(SpriteBatch spriteBatch)
        {
            //spriteBatch.Draw(textureHandler.getBackground(), Vector2.Zero, Color.White);
            SpriteFont font = textureHandler.getFont();

            if (Game1.DEBUG)
            {
                spriteBatch.DrawString(font, "Rotation: " + humptyDumpty.Rotation.ToString(), new Vector2(10, 50), Color.White);

                /*
                 * spriteBatch.DrawString(font, "forceApplied: " + humptyDumpty.Force.ToString(), new Vector2(10, 50), Color.White);
                 * spriteBatch.DrawString(font, "acceleration: " + MathHelper.ToDegrees(acceleration.X).ToString(), new Vector2(10, 70), Color.White);
                 * spriteBatch.DrawString(font, "texturePosition: " + humptyDumpty.Position.X.ToString() + ":" + humptyDumpty.Position.Y.ToString(), new Vector2(10, 90), Color.White);
                 */
            }

            //spriteBatch.Draw(textureProjectile, Color.White);
            spriteBatch.DrawString(font, "Score: " + ((int)(scoreTime / 100)).ToString(), new Vector2(10, 10), Color.White);
            spriteBatch.DrawString(font, "High Score: " + ((int)(highScore / 100)).ToString(), new Vector2(10, 30), Color.White);

            humptyDumpty.Draw(spriteBatch);
            king.Draw(spriteBatch);
        }