Пример #1
0
        public World(Map map, List<Player> players, SpriteFont font, Texture2D hud, CountDown countDown)
        {
            RaceTimer = new RaceTimer();

            CountDown = countDown;
            CountDown.Start();
            Players = players;
            Map = map;
            _info = new Info(font, Map, Players, hud);
            CollisionImage = map.CollisionImage;
            Winner = null;
        }
Пример #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            MapFactory.Initilize();
            ContentLoader.Load(Content);

            _menuKey = Keys.Escape;
            _fullScreenKey = Keys.F;
            _isMainMenuScreenShowed = true;
            _oldKeyboardState = Keyboard.GetState();
            _countDown = new CountDown(ContentLoader.CountDownFont);
            _computerPlayersAi = new ComputerPlayersAi();
            _pauseMenu = new PauseMenu(ContentLoader.TransparentBackground, ContentLoader.MenuFont);
            _mainMenu = new MainMenu(ContentLoader.TransparentBackground, ContentLoader.MenuFont);
            base.Initialize();
        }