Ballz.Renderer.BaseRenderer.DrawSky C# (CSharp) Метод

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

public DrawSky ( ) : void
Результат void
        public void DrawSky()
        {
            var cloudPosition = ElapsedTime.TotalSeconds * CloudSpeed;
            GraphicsDevice.Clear(SkyColor);
            SpriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.LinearWrap);
            SpriteBatch.Draw(
                SkyTexture,
                new Rectangle(0, GraphicsDevice.Viewport.Height - SkyTexture.Height, GraphicsDevice.Viewport.Width, SkyTexture.Height),
                new Rectangle((int)cloudPosition, 0, GraphicsDevice.Viewport.Width, SkyTexture.Height),
                Color.White
                );
            SpriteBatch.Draw(
                CloudTexture,
                new Rectangle(0, GraphicsDevice.Viewport.Height - CloudTexture.Height - 80, GraphicsDevice.Viewport.Width, CloudTexture.Height),
                new Rectangle((int)(cloudPosition * 2), 0, GraphicsDevice.Viewport.Width, CloudTexture.Height),
                Color.White
                );
            SpriteBatch.End();
        }