public static void Load(ScreenManager screenManager, params GameScreen[] screensToLoad) { foreach (GameScreen screen in screenManager.GetScreens()) screen.ExitScreen(); LoadingScreen loadingScreen = new LoadingScreen(screenManager, screensToLoad); screenManager.AddScreen(loadingScreen); }
public static void Load(ScreenManager screenManager, params GameScreen[] screensToLoad) { foreach (GameScreen screen in screenManager.GetScreens()) screen.ExitScreen(); bool wait = false; if (!(screensToLoad[0] is MenuScreen)) { AudioManager.FadeSong(0.0f, TimeSpan.FromSeconds(2)); wait = true; } LoadingScreen loadingScreen = new LoadingScreen(screenManager, screensToLoad, wait); screenManager.AddScreen(loadingScreen); }
public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; graphics.PreferredBackBufferWidth = 680; graphics.PreferredBackBufferHeight = 480; // Create the screen manager component. screenManager = new ScreenManager(this); Components.Add(screenManager); //screenManager.ScreenTraceEnabled = true; screenManager.ScreenTraceEnabled = false; // Activate the first screens. //screenManager.AddScreen(new TitleScreen()); screenManager.AddScreen(new MainMenuScreen()); }
public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; graphics.PreferredBackBufferWidth = GlobalConstants.ScreenWidth; graphics.PreferredBackBufferHeight = GlobalConstants.ScreenHeight; // Create the screen manager component. screenManager = new ScreenManager(this); Components.Add(screenManager); AudioManager.Initialize(this); //screenManager.ScreenTraceEnabled = true; screenManager.ScreenTraceEnabled = false; // Activate the first screens. //screenManager.AddScreen(new TitleScreen()); screenManager.AddScreen(new MainMenuScreen()); //screenManager.AddScreen(new PlayableMainGameScreen("neighborhoodScreen.txt", new Vector2(3, 20))); }
// Do not use this. Use load method instead. private LoadingScreen(ScreenManager screenManager, GameScreen[] screensToLoad) { this.screensToLoad = screensToLoad; TransitionOnTime = TimeSpan.FromSeconds(1.0); }
// Do not use this. Use load method instead. private LoadingScreen(ScreenManager screenManager, GameScreen[] screensToLoad, bool waitForMusic) { shouldWaitForMusic = waitForMusic; this.screensToLoad = screensToLoad; TransitionOnTime = TimeSpan.FromSeconds(1.0); }