Пример #1
0
        protected override void Initialize()
        {
            // load the game settings from file
            settings.loadFrom(Content.RootDirectory + "/" + GameSettings.defaultFileName);

            // set the screen resolution
            graphics.PreferredBackBufferWidth  = settings.screenWidth;
            graphics.PreferredBackBufferHeight = settings.screenHeight;
            graphics.ApplyChanges();

            // set the screen attributes / full screen mode
            Window.AllowUserResizing = false;
            if (settings.fullScreen)
            {
                // NOTE: may cause access violations in dual screen situations
                graphics.ToggleFullScreen();
            }

            controlSystem.initialize();
            menu.initialize();
            console.initialize();
            m_MouseManager.Initialize();
            UIScreenManager.CreateInstance();

            DefinitionManager.LoadDefinitions("Content\\Objects");

            theCamera = new CameraBase();
            theCamera.initialize();

            maxTime[0] = 2;
            maxTime[1] = 60;

            base.Initialize();
        }