Microsoft.Xna.Framework.Graphics.BasicEffect.Clone C# (CSharp) Метод

Clone() публичный Метод

Creates a clone of the current BasicEffect instance.
public Clone ( ) : Effect
Результат Effect
        public override Effect Clone()
        {
            return new BasicEffect(this);
        }

Usage Example

Пример #1
0
        public DrawWrapper(SpriteBatch batch, GraphicsDevice device, AssetManager assetsManager)
        {
            GlobalScale = 1f;

            spriteBatch = batch;
            graphicsDevice = device;
            deviceWidth = graphicsDevice.Viewport.Width;

            Assets = assetsManager;

            basicEffect = new BasicEffect(device)
            {
                VertexColorEnabled = true,
                World = Matrix.Identity,
                View = Matrix.Identity,
            };

            guiEffect = (BasicEffect) basicEffect.Clone();

            SetProjectionMatrix(standardWidth, standardHeight);
            ScreenSize = new Vector2(graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height);

            displayWidth = standardWidth;
            displayHeight = standardHeight;
        }
All Usage Examples Of Microsoft.Xna.Framework.Graphics.BasicEffect::Clone