コード例 #1
0
ファイル: Demo.cs プロジェクト: JoyPanda/sharpsteer
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            courierFont = new FixedFont(content.Load <Texture2D>("Fonts/Courier"));

            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

            effect = content.Load <Effect>("Shaders/Simple");
            effectParamWorldViewProjection = effect.Parameters["WorldViewProjection"];

            vertexDeclaration = new VertexDeclaration(graphics.GraphicsDevice, VertexPositionColor.VertexElements);
        }
コード例 #2
0
        /// <summary>
        /// Load your graphics content.  If loadAllContent is true, you should
        /// load content from both ResourceManagementMode pools.  Otherwise, just
        /// load ResourceManagementMode.Manual content.
        /// </summary>
        protected override void LoadContent()
        {
            base.LoadContent();
            // TODO: Load any ResourceManagementMode.Automatic content
            courierFont = new FixedFont(content.Load <Texture2D>("Content/Fonts/Courier"));

            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

            effect = content.Load <Effect>("Content/Shaders/Simple");
            effectParamWorldViewProjection = effect.Parameters["WorldViewProjection"];

            // TODO: Load any ResourceManagementMode.Manual content
            vertexDeclaration = new VertexDeclaration(VertexPositionTexture.VertexDeclaration.GetVertexElements());
        }
コード例 #3
0
ファイル: Demo.cs プロジェクト: JoyPanda/sharpsteer
        /// <summary>
        /// Load your graphics content.  If loadAllContent is true, you should
        /// load content from both ResourceManagementMode pools.  Otherwise, just
        /// load ResourceManagementMode.Manual content.
        /// </summary>
        /// <param name="loadAllContent">Which type of content to load.</param>
        protected override void LoadGraphicsContent(bool loadAllContent)
        {
            if (loadAllContent)
            {
                // TODO: Load any ResourceManagementMode.Automatic content
                courierFont = new FixedFont(content.Load <Texture2D>("Content/Fonts/Courier"));

                spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

                effect = content.Load <Effect>("Content/Shaders/Simple");
                effectParamWorldViewProjection = effect.Parameters["WorldViewProjection"];
            }

            // TODO: Load any ResourceManagementMode.Manual content
            vertexDeclaration = new VertexDeclaration(graphics.GraphicsDevice, VertexPositionColor.VertexElements);
        }
コード例 #4
0
ファイル: Demo.cs プロジェクト: tylerforsythe/SharpSteer2
        /// <summary>
        /// Load your graphics content.  If loadAllContent is true, you should
        /// load content from both ResourceManagementMode pools.  Otherwise, just
        /// load ResourceManagementMode.Manual content.
        /// </summary>
        protected override void LoadContent()
        {
            base.LoadContent();
            // TODO: Load any ResourceManagementMode.Automatic content
            courierFont = new FixedFont(content.Load<Texture2D>("Content/Fonts/Courier"));

            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

            effect = content.Load<Effect>("Content/Shaders/Simple");
            effectParamWorldViewProjection = effect.Parameters["WorldViewProjection"];

            // TODO: Load any ResourceManagementMode.Manual content
            vertexDeclaration = new VertexDeclaration(VertexPositionTexture.VertexDeclaration.GetVertexElements());
        }