/// <summary> /// Metoda statyczna. Wy³¹cza wszystkie aktywne ekrany, pokazuje ekran ³adowania i inicjalizuje podane w parametrze screensToLoad ekrany /// </summary> public static void Load(ScreenManager screenManager, bool loadingIsSlow,bool exitOtherScreens, params GameScreen[] screensToLoad) { if (exitOtherScreens) foreach (GameScreen screen in screenManager.GetScreens()) screen.ExitScreen(); var loadingScreen = new LoadingScreen(screenManager,loadingIsSlow,screensToLoad); screenManager.AddScreen(loadingScreen); }
private LoadingScreen(ScreenManager screenManager, bool loadingIsSlow, GameScreen[] screensToLoad) { _loadingIsSlow = loadingIsSlow; _screensToLoad = screensToLoad; Message = "Loading..."; TransitionOnTime = TimeSpan.FromSeconds(0.5); }
/// <summary> /// Glówny konstruktor gry /// </summary> public MinerGame() { Content.RootDirectory = "Content"; graphics = new GraphicsDeviceManager(this); SettingsManager.Instance.InitializeDefault(); CreateGameFilesAndDirectories(); LoadLevelList(); graphics.PreferredBackBufferWidth = (int)SettingsManager.Instance.Resolution.X; graphics.PreferredBackBufferHeight = (int)SettingsManager.Instance.Resolution.Y; graphics.ApplyChanges(); ScreenManager = new ScreenManager(this); Components.Add(ScreenManager); AddInitialScreens(); }
public GameStateKeeper(ScreenManager screenManager) { _screenManager = screenManager; }