Beispiel #1
0
 private LoadingScreen(ScreenManager screenManager, bool loadingIsSlow,
                       GameScreen[] screensToLoad, bool isNewGame)
 {
     this.loadingIsSlow = loadingIsSlow;
     this.screensToLoad = screensToLoad;
     loadingNewGame = isNewGame;
     TransitionOnTime = TimeSpan.FromSeconds(.5);
 }
Beispiel #2
0
        public void AddScreen(GameScreen screen, PlayerIndex? controllingPlayer)
        {
            screen.ControllingPlayer = controllingPlayer;
            screen.ScreenManager = this;
            screen.IsExiting = false;

            if(isInitialized)
            {
                screen.LoadContent();
            }

            screens.Add(screen);
        }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 public void RemoveScreen(GameScreen screen)
 {
     if(isInitialized)
     {
         screen.UnloadContent();
     }
     screens.Remove(screen);
     screensToUpdate.Remove(screen);
 }