private void drawText() { String leftInfo = "Left Wheel\nRotation: " + leftWheel.Rotation.ToString() + "\nTo Degrees: " + MathHelper.ToDegrees(leftWheel.Rotation).ToString() + "\nDegrees%360: " + Math.Abs((MathHelper.ToDegrees(leftWheel.Rotation)) % 360) + "\ncontainer count: " + leftWheel.ContainerCount + "\nget container from rotation: " + leftWheel.getLowerFacingContainerFromRotation(); String rightInfo = "Right Wheel\nRotation: " + rightWheel.Rotation.ToString(); String gameOver = ""; if (gameState == (int)GAME_STATES.GAME_OVER) { gameOver = "GAME OVER!\n\n Controller.Back or Keyboard.R to restart"; } //spriteBatch.DrawString(font, leftInfo+"\n\n"+rightInfo, new Vector2(300, 250), Color.White); spriteBatch.DrawString(font, "Score: " + totalScore + "\nHeat: " + oven.Heat + "/100" + "\n\n" + comboMessages + "\n" + gameOver, new Vector2(300, 250), Color.White); }
//Used to draw any text messages to the player's screen private void drawText() { //The left wheel information including rotation in degrees, the count of the cupcakes in the container, and the container from rotation. String leftInfo = "Left Wheel\nRotation: " + leftWheel.Rotation.ToString() + "\nTo Degrees: " + MathHelper.ToDegrees(leftWheel.Rotation).ToString() + "\nDegrees%360: " + Math.Abs((MathHelper.ToDegrees(leftWheel.Rotation)) % 360) + "\ncontainer count: " + leftWheel.ContainerCount + "\nget container from rotation: " + leftWheel.getLowerFacingContainerFromRotation(); String rightInfo = "Right Wheel\nRotation: " + rightWheel.Rotation.ToString(); //The right wheel information: the rotation. String gameOver = ""; //A game over message to be displayed when necessary. if (gameState == (int)GAME_STATES.GAME_OVER) { gameOver = "GAME OVER!\n\n Controller.Back or Keyboard.R to restart"; } //spriteBatch.DrawString(font, leftInfo+"\n\n"+rightInfo, new Vector2(300, 250), Color.White); //Drawing the score and oven temperature out of 100. spriteBatch.DrawString(font, "Score: " + totalScore + "\nHeat: " + oven.Heat + "/100" + "\n\n" + comboMessages + "\n" + gameOver, new Vector2(300, 250), Color.White); }