Esempio n. 1
0
 private LoadingScreen(ScreenManager screenManager, bool loadingIsSlow,
                       GameScreen[] screensToLoad, bool isNewGame)
 {
     this.loadingIsSlow = loadingIsSlow;
     this.screensToLoad = screensToLoad;
     loadingNewGame = isNewGame;
     TransitionOnTime = TimeSpan.FromSeconds(.5);
 }
Esempio n. 2
0
 public GameplayScreen(ScreenManager sMgr, bool isNewGame)
 {
     TransitionOnTime  = TimeSpan.FromSeconds(1.5);
     TransitionOffTime = TimeSpan.FromSeconds(.5);
     MediaPlayer.Stop();
     ScreenManager = sMgr;
     GameplayInit(isNewGame);
 }
Esempio n. 3
0
 public static void Load(ScreenManager screenManager, bool loadingIsSlow,
                          PlayerIndex? controllingPlayer, bool isNewGame,
                                       params GameScreen[] screensToLoad)
 {
     foreach(GameScreen screen in screenManager.GetScreens())
     {
         screen.ExitScreen();
     }
     LoadingScreen loadingScreen = new LoadingScreen(screenManager,
                                 loadingIsSlow, screensToLoad, isNewGame);
     screenManager.AddScreen(loadingScreen, controllingPlayer);
 }
Esempio n. 4
0
        public Main()
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth  = 1000;
            graphics.PreferredBackBufferHeight = 660;

            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            screenManager.AddScreen(new BackgroundScreen(), null);
            screenManager.AddScreen(new MainMenuScreen(), null);
        }