Пример #1
0
 public RectangleOverlay(Rectangle r, GameScreen o)
 {
     outerRectangle = r;
     innerRectangle = new Rectangle((int)r.X + 2, (int)r.Y + 2, r.Width - 4, r.Height - 4);
     owner = o;
     boxColor = Color.DarkBlue;
     borderColor = Color.White;
 }
Пример #2
0
        public BattleScreen(String filename, EnemyEntity starter, GameScreen previous)
        {
            TransitionOnTime = TimeSpan.Zero;
            TransitionOffTime = TimeSpan.Zero;

            currentBattleState = BattleState.Starting;
            previousScreen = previous;

            creator = starter;
            battleFile = filename;
        }
Пример #3
0
        public void AddScreen(GameScreen screen)
        {
            screen.ScreenManager = this;
            screen.IsExiting = false;

            // If we have a graphics device, tell the screen to load content.
            if (isInitialized)
            {
                screen.LoadContent();
            }

            screens.Add(screen);
        }
Пример #4
0
 // Do not use this. Use load method instead.
 private LoadingScreen(ScreenManager screenManager, GameScreen[] screensToLoad)
 {
     this.screensToLoad = screensToLoad;
     TransitionOnTime = TimeSpan.FromSeconds(1.0);
 }
Пример #5
0
        public void RemoveScreen(GameScreen screen)
        {
            // If we have a graphics device, tell the screen to unload content.
            if (isInitialized)
            {
                screen.UnloadContent();
            }

            screens.Remove(screen);
            screensToUpdate.Remove(screen);
        }
Пример #6
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);
 }