Inheritance: DefaultMaterialSet
Exemple #1
0
        protected override void LoadContent() {
            Materials = new PongMaterials(Content) {
                ViewportScale = new Vector2(1, 1),
                ViewportPosition = new Vector2(0, 0),
                ProjectionMatrix = Matrix.CreateOrthographicOffCenter(
                    0, GraphicsDevice.Viewport.Width,
                    GraphicsDevice.Viewport.Height, 0,
                    0, 1
                )
            };

            Font = Content.Load<SpriteFont>("Tahoma");

            SpriteBatch = new SpriteBatch(GraphicsDevice);
        }
Exemple #2
0
        protected override void OnLoadContent(bool isReloading)
        {
            Materials = new PongMaterials(RenderCoordinator)
            {
                ViewportScale    = new Vector2(1, 1),
                ViewportPosition = new Vector2(0, 0),
                ProjectionMatrix = Matrix.CreateOrthographicOffCenter(
                    0, GraphicsDevice.Viewport.Width,
                    GraphicsDevice.Viewport.Height, 0,
                    0, 1
                    )
            };

            Font = Content.Load <SpriteFont>("Tahoma");

            SpriteBatch = new SpriteBatch(GraphicsDevice);
        }