private LoadingScreen(ScreenManager screenManager, bool loadingIsSlow, GameScreen[] screensToLoad, bool isNewGame) { this.loadingIsSlow = loadingIsSlow; this.screensToLoad = screensToLoad; loadingNewGame = isNewGame; TransitionOnTime = TimeSpan.FromSeconds(.5); }
public void AddScreen(GameScreen screen, PlayerIndex? controllingPlayer) { screen.ControllingPlayer = controllingPlayer; screen.ScreenManager = this; screen.IsExiting = false; if(isInitialized) { screen.LoadContent(); } screens.Add(screen); }
private LoadingScreen(bool loadingIsSlow, GameScreen[] screensToLoad, bool isNewGame) { this.loadingIsSlow = loadingIsSlow; this.screensToLoad = screensToLoad; loadingNewGame = isNewGame; introTexture = new Texture2D[8]; prevtime = TimeSpan.Zero; frameDur = TimeSpan.FromSeconds(.6); curFrame = 0; TransitionOnTime = TimeSpan.FromSeconds(.5); exitGamePlayScreen = screensToLoad.Length > 1; }
public void RemoveScreen(GameScreen screen) { if(isInitialized) { screen.UnloadContent(); } screens.Remove(screen); screensToUpdate.Remove(screen); }