spaceconquest.WinScreen.DrawBackgroundAction C# (CSharp) Method

DrawBackgroundAction() private method

private DrawBackgroundAction ( ) : void
return void
        private void DrawBackgroundAction()
        {
            Vector3 cameraPosition = new Vector3(0, 0, 30);

            float aspect = Game1.device.Viewport.AspectRatio;

            Matrix world = Matrix.Identity;
            //world = Matrix.CreateTranslation(offset);

            // Matrix view = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up);
            Matrix view = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up);
            Matrix projection = Matrix.CreatePerspectiveFieldOfView(1, aspect, 1, 10000);
            AsteroidModel.Draw(world, view, projection, Color.Gray, 10, true, zr);

            //update

            // z rotate for model
            zr += 0.3f;
            if (zr > 360.0f) zr = 0.0f;

            //x position of camera
            if (x < 0) xAcc = 1;
            if (x > 200) xAcc = -1;
            x += xAcc * 0.9f;

            if (y < 0) yAcc = 1;
            if (y > 200) yAcc = -1;
            y += yAcc * 0.9f;
        }