Paint.BaseGame.LoadContent C# (CSharp) Méthode

LoadContent() protected méthode

We load any content we need at the beginning of the application life cycle. Also anything that needs initialising is done here
protected LoadContent ( ) : void
Résultat void
        protected override void LoadContent()
        {
            this.SpriteBatch = new SpriteBatch (GraphicsDeviceManager.GraphicsDevice);

            // determine if we are a retina or not -
            // if so then we'll need to double (scale = 2) our layout locations/sizes
            // and load a bigger spritemap
            bool highResolution = this.DeviceScale  > 1;

            Texture2D graphicsTextureMap = null;
            if (highResolution)
            {
                graphicsTextureMap = Content.Load<Texture2D>("[email protected]");
            }
            else
            {
                graphicsTextureMap = Content.Load<Texture2D>("graphics.png");
            }

            this.GraphicsDisplay = new GraphicsDisplay(graphicsTextureMap, this.SpriteBatch, highResolution);

            this.Canvas = new Canvas(this.GraphicsDisplay);

            this.ToolBox = CreateToolbox();

            this.CreateRenderTargets();
        }