Example #1
0
		/// <summary>
		/// Constructor fills in the menu contents.
		/// </summary>
		public TitleScreen()
			: base() {
			// Create our menu entries.
			onePlayerMenuEntry = new MenuEntry();
			twoPlayersMenuEntry = new MenuEntry();
			exitMenuEntry = new MenuEntry();

			// Hook up menu event handlers.
			onePlayerMenuEntry.Selected += OnePlayerMenuEntrySelected;
			twoPlayersMenuEntry.Selected += TwoPlayerMenuEntrySelected;
			exitMenuEntry.Selected += OnCancel;

			// Add entries to the menu.
			MenuEntries.Add( onePlayerMenuEntry );
			MenuEntries.Add( twoPlayersMenuEntry );
			MenuEntries.Add( exitMenuEntry );

			// start the title screen music
			AudioManager.PlayMusic( "Music_Title" );
		}