Ballz.Renderer.MenuRenderer.RenderMenuBackground C# (CSharp) Метод

RenderMenuBackground() приватный Метод

private RenderMenuBackground ( System.Item menu, float fadeProgress ) : void
menu System.Item
fadeProgress float
Результат void
        private void RenderMenuBackground(Item menu, float fadeProgress)
        {
            var background = (menu as Composite)?.BackgroundTexture;

            if (background != null)
                SpriteBatch.Draw(
                    background,
                    new Rectangle((GraphicsDevice.Viewport.Width - background.Width) / 2, (GraphicsDevice.Viewport.Height - background.Height) / 2, background.Width, background.Height),
                    new Color(Color.White, fadeProgress)
                    );
        }