/// <summary> /// Load the main menu screen. /// </summary> /// <param name="contentManager"></param> public override void LoadContent(ContentManager contentManager) { // Set the background. string [] assets = { "Backgrounds/space", "Clouds/cloudsspace"}; lbBackground.LoadContent(contentManager, assets); // Set the Title picture spTitle.LoadContent(contentManager, "Sprites/climbtitle"); spTitle.Position = new Vector2(100, 50); // Set up the menu. string [] opts = { "Play!", "Options!", "High Scores!", "Quit!" }; EventHandler[] handlers = { new EventHandler(SelectPlayEvent), new EventHandler(SelectOptionsEvent), new EventHandler(SelectHighScoreEvent), new EventHandler(SelectQuitEvent) }; mMenu.LoadContent(contentManager, opts, handlers); mMenu.SetBGColors(Gradients.TransparentBlueGradient); // Set up the MOTD. dlLabel = new DanLabel(100, 550, 600, 100, CUtil.MOTD); dlLabel.LoadContent(contentManager); // audio testing Song song = contentManager.Load<Song>("Audio/Sun and My Synth LOOPY"); MediaPlayer.IsRepeating = true; MediaPlayer.Volume = 0.1f; MediaPlayer.Play(song); MediaPlayer.Stop(); SoundEffect soundEffect = contentManager.Load<SoundEffect>("Audio/jumpsound"); soundEffect.Play(); }
/// <summary> /// Load a new Altimeter /// </summary> public void LoadContent(ContentManager contentManager) { dlLabel = new DanLabel(5, 5, 300, 35); dlLabel.LoadContent(contentManager); font = contentManager.Load<SpriteFont>("verdana"); }