/// <summary> /// Activates the loading screen. /// </summary> public static void Load(ScreenManager screenManager, EventHandler<EventArgs> loadNextScreen, bool loadingIsSlow) { // Tell all the current screens to transition off. foreach (GameScreen screen in screenManager.GetScreens()) screen.ExitScreen(); // Create and activate the loading screen. LoadingScreen loadingScreen = new LoadingScreen(); loadingScreen.loadingIsSlow = loadingIsSlow; loadingScreen.loadNextScreen = loadNextScreen; screenManager.AddScreen(loadingScreen); }
/// <summary> /// Constructs a new NetRumbleGame object. /// </summary> public NetRumbleGame() { // initialize the graphics device manager graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferWidth = 1280; graphics.PreferredBackBufferHeight = 720; // initialize the content manager Content.RootDirectory = "Content"; // initialize the gamer-services component // this component enables Live sign-in functionality // and updates the Gamer.SignedInGamers collection. Components.Add(new GamerServicesComponent(this)); // initialize the screen manager screenManager = new ScreenManager(this); Components.Add(screenManager); // initialize the audio system //AudioManager.Initialize(this, new DirectoryInfo(Content.RootDirectory + @"\audio\wav")); AudioManager.Initialize(this, new DirectoryInfo(Path.Combine(Content.RootDirectory,@"Audio/wav"))); }