public static State OptionsUpdate() { background = new Background(Content, "images/background/endless/", _window); return State.Menu; }
private void LoadContent(GameWindow window) { contentManager = new ContentManager(GameCore.ServiceProvider, "Content"); background = new Background(contentManager, "images/background/endless/", window); }
public static void LoadContent(ContentManager content, GameWindow window) { hud = content.Load<Texture2D>("images/hud/HUD"); GameView = window.ClientBounds; GameView.Width -= hud.Width; GameView.Y = 0; HUDView = new Rectangle(GameView.Right, 0, hud.Width, hud.Height); boss = new Boss(new Animation(content.Load<Texture2D>("images/boss"), 0.1F, true, 100), new Vector2(Rng.Next(window.ClientBounds.Width - 64), -1 * Rng.Next(500) - 100), new Vector2(0, (float)Rng.NextDouble() * -3 - 1), Enemy.Destruction); //enemies.Add(boss); Content = content; _window = window; menu = new Menu.Menu((int)State.Menu, content); menu.AddItem(content.Load<Texture2D>("images/menu/btnNewGame"), (int)State.Play, window); menu.AddItem(content.Load<Texture2D>("images/menu/btnHighScore"), (int)State.HighScore, window); menu.AddItem(content.Load<Texture2D>("images/menu/btnOptions"), (int)State.Options, window); menu.AddItem(content.Load<Texture2D>("images/menu/btnQuit"), (int)State.Quit, window); background = new Background(content, "images/background/endless/", window); content.Load<SoundEffect>("sounds/lets_go").Play(); Stencil = new Font(content.Load<SpriteFont>("fonts/Stencil")); t = Stencil.Size("Nothing here yet"); //player.IsInvincible = true; }