public void Draw(SpriteBatch spriteBatch, GraphicsDevice graphics) { graphics.Clear(Color.CornflowerBlue); if (!achievementSet) { if (pointerDraw) { pointer.Draw(spriteBatch, pointerLoc); } for (int i = 0; i < 24; i++) { block.draw(spriteBatch, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (i * 16), Game.MainCameraObject.DestinationRectangle.Y + (187)), Color.White); block.draw(spriteBatch, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (i * 16), Game.MainCameraObject.DestinationRectangle.Y + (203)), Color.White); block.draw(spriteBatch, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (i * 16), Game.MainCameraObject.DestinationRectangle.Y + (219)), Color.White); } bigCloud.Draw(spriteBatch, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 1.1f), Game.MainCameraObject.DestinationRectangle.Y + (40))); smallCloud.Draw(spriteBatch, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (32 * 9.2f), Game.MainCameraObject.DestinationRectangle.Y + (60))); bush.Draw(spriteBatch, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (32 * 8.7f), Game.MainCameraObject.DestinationRectangle.Y + (171))); mountain.Draw(spriteBatch, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 1.1f), Game.MainCameraObject.DestinationRectangle.Y + (152))); mario.Draw(spriteBatch, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (32 * 1.1f), Game.MainCameraObject.DestinationRectangle.Y + (171))); logo.Draw(spriteBatch, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (32 * 3.4f), Game.MainCameraObject.DestinationRectangle.Y + (10))); spriteBatch.Begin(); if (!buttonPressed) { spriteBatch.DrawString(Font, "Press Start", new Vector2(32 * 9, 270), Color.White); spriteBatch.DrawString(Font, "Enter/Start", new Vector2(16, 420), Color.White); } else { if (!worldsPressed) { spriteBatch.DrawString(Font, "Z/A - Select X/B - Back Up/Down - Move", new Vector2(16, 420), Color.White); spriteBatch.DrawString(Font, "World Select", new Vector2(32 * 9, 210), Color.White); if (canLoad) { spriteBatch.DrawString(Font, "Load", new Vector2(32 * 9, 240), Color.White); } else { spriteBatch.DrawString(Font, "Load", new Vector2(32 * 9, 240), Color.Gray); } spriteBatch.DrawString(Font, "Achievements", new Vector2(32 * 9, 270), Color.White); } else if (worldsPressed) { spriteBatch.DrawString(Font, "Z/A - Select X/B - Back Up/Down - Move", new Vector2(16, 420), Color.White); spriteBatch.DrawString(Font, "Test World", new Vector2(32 * 9, 210), Color.White); spriteBatch.DrawString(Font, "World 1-1", new Vector2(32 * 9, 240), Color.White); spriteBatch.DrawString(Font, "World 1-2", new Vector2(32 * 9, 270), Color.White); spriteBatch.DrawString(Font, "World 1-4", new Vector2(32 * 9, 300), Color.White); } } spriteBatch.End(); } else { AchievementDraw(goomba, spriteBatch, Game.trophy.killedGoomba, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 1.1f), Game.MainCameraObject.DestinationRectangle.Y + (10))); AchievementDraw(konami, spriteBatch, Game.trophy.theCode, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 1.1f), Game.MainCameraObject.DestinationRectangle.Y + (70))); AchievementDraw(boxFinder, spriteBatch, Game.trophy.found, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 1.1f), Game.MainCameraObject.DestinationRectangle.Y + (130))); AchievementDraw(firedUp, spriteBatch, Game.trophy.fireFlower, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 1.1f), Game.MainCameraObject.DestinationRectangle.Y + (190))); AchievementDraw(jumpMan, spriteBatch, Game.trophy.jumper, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 1.1f), Game.MainCameraObject.DestinationRectangle.Y + (250))); AchievementDraw(niceTry, spriteBatch, Game.trophy.gameOver, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 15.1f), Game.MainCameraObject.DestinationRectangle.Y + (10))); AchievementDraw(notMarioMaker, spriteBatch, Game.trophy.marioMade, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 15.1f), Game.MainCameraObject.DestinationRectangle.Y + (70))); AchievementDraw(brickBreaker, spriteBatch, Game.trophy.buster, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 15.1f), Game.MainCameraObject.DestinationRectangle.Y + (130))); AchievementDraw(worldComplete, spriteBatch, Game.trophy.completed, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 15.1f), Game.MainCameraObject.DestinationRectangle.Y + (190))); AchievementDraw(seeingStars, spriteBatch, Game.trophy.gotAStar, new Vector2(Game.MainCameraObject.DestinationRectangle.X + (16 * 15.1f), Game.MainCameraObject.DestinationRectangle.Y + (250))); spriteBatch.Begin(); spriteBatch.DrawString(Font, "X/B - Back", new Vector2(16, 420), Color.White); spriteBatch.End(); } }
public void draw(SpriteBatch spriteBatch, Vector2 location, Color color) { Location = location; Sprite.draw(spriteBatch, location, color); Color = color; }