public void Load(ContentManager Content) { gameOver = Content.Load <Texture2D>("Textures/Misc/gameOver"); lessHp = new Backround(Content.Load <Texture2D>("Textures/Backrounds/Backround3"), new Rectangle(0, 0, graphicsDevice.PreferredBackBufferWidth, graphicsDevice.PreferredBackBufferHeight)); BackOver = new Backround(Content.Load <Texture2D>("Textures/Backrounds/BackroundOver"), new Rectangle(0, 0, graphicsDevice.PreferredBackBufferWidth, graphicsDevice.PreferredBackBufferHeight)); overSound = true; select = Content.Load <SoundEffect>("Sounds/MenuSelect"); push = Content.Load <SoundEffect>("Sounds/MenuPush"); back = Content.Load <SoundEffect>("Sounds/MenuBack"); pause = Content.Load <SoundEffect>("Sounds/MenuPause"); OverTheme = Content.Load <Song>("Sounds/gameOver"); size = new Vector2(graphicsDevice.PreferredBackBufferWidth / 16, graphicsDevice.PreferredBackBufferHeight / 16); Vector2 center = new Vector2(graphicsDevice.PreferredBackBufferWidth / 2, graphicsDevice.PreferredBackBufferHeight / 2); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X * 2), (int)(center.Y - size.Y * 3), (int)size.X, (int)size.Y), "")); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X), (int)(center.Y - size.Y), (int)size.X, (int)size.Y), "Continue")); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X), (int)(center.Y), (int)size.X, (int)size.Y), "Main Menu")); foreach (MenuObject obj in objects) { obj.Load(Content); } CanChange = true; SelecRect = new Rectangle((int)(center.X - size.X), (int)(center.Y - size.Y * 2), (int)size.X, (int)size.Y); }
public void Load(ContentManager Content) { backround = new Backround(Content.Load <Texture2D>("Textures/Backrounds/BackroundOptions"), new Rectangle(0, 0, graphicsDevice.PreferredBackBufferWidth, graphicsDevice.PreferredBackBufferHeight)); if (graphicsDevice.IsFullScreen) { ScreenMode = "FullScreen"; } else { ScreenMode = "Window"; } select = Content.Load <SoundEffect>("Sounds/MenuSelect"); push = Content.Load <SoundEffect>("Sounds/MenuPush"); back = Content.Load <SoundEffect>("Sounds/MenuBack"); choose = Content.Load <SoundEffect>("Sounds/MenuSelect"); size = new Vector2(graphicsDevice.PreferredBackBufferWidth / 16, graphicsDevice.PreferredBackBufferHeight / 16); Vector2 center = new Vector2(graphicsDevice.PreferredBackBufferWidth / 2, graphicsDevice.PreferredBackBufferHeight / 2); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X * 2), (int)(center.Y + size.Y * 2 - size.Y * 5), (int)size.X, (int)size.Y), "Music")); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X * 2), (int)(center.Y + size.Y * 2 - size.Y * 4), (int)size.X, (int)size.Y), "ScreenMode")); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X * 2), (int)(center.Y + size.Y * 2 - size.Y * 3), (int)size.X, (int)size.Y), "Level")); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X * 2), (int)(center.Y + size.Y * 2 - size.Y * 2), (int)size.X, (int)size.Y), "Health")); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X * 2), (int)(center.Y + size.Y * 2 - size.Y * 1), (int)size.X, (int)size.Y), "Back to Menu")); //Default CanChange = false; level = 1; healthPoint = 3; subObjects.Add(new MenuObject(new Rectangle((int)(center.X + size.X * 2), (int)(center.Y + size.Y * 2 - size.Y * 5), (int)size.X, (int)size.Y), ((int)(MediaPlayer.Volume * 100)).ToString() + " % ")); subObjects.Add(new MenuObject(new Rectangle((int)(center.X + size.X * 2), (int)(center.Y + size.Y * 2 - size.Y * 4), (int)size.X, (int)size.Y), ScreenMode)); subObjects.Add(new MenuObject(new Rectangle((int)(center.X + size.X * 2), (int)(center.Y + size.Y * 2 - size.Y * 3), (int)size.X, (int)size.Y), level.ToString())); subObjects.Add(new MenuObject(new Rectangle((int)(center.X + size.X * 2), (int)(center.Y + size.Y * 2 - size.Y * 2), (int)size.X, (int)size.Y), healthPoint.ToString())); foreach (MenuObject obj in objects) { obj.Load(Content); } foreach (MenuObject SubObj in subObjects) { SubObj.Load(Content); } SelecRect = new Rectangle((int)(center.X - size.X * 2), (int)(center.Y - size.Y * 5), (int)size.X, (int)size.Y); }
public void Load(ContentManager Content) { backround = new Backround(Content.Load <Texture2D>("Textures/Backrounds/BackroundComplete"), new Rectangle(0, 0, graphicsDevice.PreferredBackBufferWidth, graphicsDevice.PreferredBackBufferHeight)); select = Content.Load <SoundEffect>("Sounds/MenuSelect"); push = Content.Load <SoundEffect>("Sounds/MenuPush"); back = Content.Load <SoundEffect>("Sounds/MenuBack"); FinalScore = 0; size = new Vector2(graphicsDevice.PreferredBackBufferWidth / 16, graphicsDevice.PreferredBackBufferHeight / 16); Vector2 center = new Vector2(graphicsDevice.PreferredBackBufferWidth / 2, graphicsDevice.PreferredBackBufferHeight / 2); objects.Add(new MenuObject(new Rectangle((int)(center.X - graphicsDevice.PreferredBackBufferWidth / 10), (int)(center.Y - graphicsDevice.PreferredBackBufferHeight / 6), (int)size.X, (int)size.Y), "Score ")); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X), (int)(center.Y), (int)size.X, (int)size.Y), "Continue")); objects.Add(new MenuObject(new Rectangle((int)(center.X - size.X), (int)(center.Y + size.Y), (int)size.X, (int)size.Y), "Main Menu")); foreach (MenuObject obj in objects) { obj.Load(Content); } CanChange = true; SelecRect = new Rectangle((int)(center.X - size.X), (int)(center.Y - size.Y * 2), (int)size.X, (int)size.Y); }