Blink.Game1.LoadContent C# (CSharp) Метод

LoadContent() защищенный Метод

LoadContent will be called once per game and is the place to load all of your content.
protected LoadContent ( ) : void
Результат void
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Should probably be in Initialize, but screen size is updated after Initialize causing weird collision issues
            Vector2 screenSize = new Vector2(GraphicsDevice.Viewport.TitleSafeArea.Right, GraphicsDevice.Viewport.TitleSafeArea.Bottom);
            game = new StateGame(screenSize);
            levelMenu = new StateLevelSelect(screenSize, "Map Select", new string[] { "Start", "Start", "Quit" }, game);
            creditsMenu = new StateCredits(screenSize, "Credits", new string[] { "Menu" });
            charMenu = new StateCharacterSelect(screenSize, "Character Select", levelMenu, game);
            //mainMenu = new StateSimpleMenu(screenSize, "Blink", new string[] { "Start", "Credits", "Quit" }, new GameState[] { charMenu, creditsMenu, new StateQuit() });
            mainMenu = new StateMainMenu(screenSize, new GameState[] { charMenu, creditsMenu, new StateQuit() });
            winScreen = new StateWin(screenSize);
            ((StateGame)game).levelSelect = levelMenu;
            ((StateGame)game).Win = winScreen;
            ((StateCredits)creditsMenu).getMenu(mainMenu);
            ((StateLevelSelect)levelMenu).prevState = charMenu;
            ((StateWin)winScreen).levelSelect = levelMenu;
            currState = mainMenu;
            currState.Initialize();
            currState.LoadContent(Content);
            AudioManager.LoadContent(Content);
        }