Пример #1
0
        protected override void Initialize()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            gameContent = Content;

            Components.Add(new InputHandler(this));

            SheetManager.Initialize(this);

            manager = new GameStateManager(this);
            Components.Add(manager);
            manager.ChangeState(new MainMenuState(this, manager));

            graphics.PreferredBackBufferWidth = GAME_WIDTH;
            graphics.PreferredBackBufferHeight = GAME_HEIGHT;
            graphics.ApplyChanges();
            IsMouseVisible = true;

            Config.Initialize(this);

               // NoiseGenerator.Initialize(this);

            base.Initialize();
        }
Пример #2
0
        protected override void Initialize()
        {
            stateManager = new GameStateManager(this);

            Components.Add(new InputHandler(this));
            Components.Add(stateManager);

            stateManager.ChangeState(new GameplayState(this, stateManager));

            base.Initialize();
        }
Пример #3
0
        protected override void Initialize()
        {
            content = Content;

            Components.Add(new InputHandler(this));

            sfxManager = new SoundManager(this);
            Components.Add(sfxManager);

            manager = new GameStateManager(this);
            Components.Add(manager);
            manager.ChangeState(new TitleState(this, manager));

            base.Initialize();
        }
Пример #4
0
        protected override void Initialize()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            projectData = new ProjectData(Content, graphics);
            Components.Add(new InputHandler(this));

            stateManager = new GameStateManager(this);
            Components.Add(stateManager);

            StartMenuScreen = new GameScreens.StartMenuScreen(this, stateManager);

            // Make the state manager jump to
            stateManager.ChangeState(StartMenuScreen);

            base.Initialize();
        }