using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace SpaceWinnie
{
	public class Skybox
	{
		Main game;
		Model skybox;

		public Skybox ( Game game )
		{
			skybox = game.Content.Load<Model> ( "skybox" );
			this.game = game as Main;
		}

		public void Update ( GameTime gameTime )
		{

		}

		public void Draw ( GameTime gameTime )
		{
			foreach ( ModelMesh m in skybox.Meshes )
			{
				foreach ( BasicEffect b in m.Effects )
				{
					b.World = Matrix.CreateScale ( 15f ) * Matrix.CreateTranslation ( 0, -45f, 0 );
					b.View = game.Camera.ViewMatrix;
					b.Projection = game.Camera.ProjectionMatrix;
				}

				m.Draw ();
			}
		}
	}
}
