// Called when the game should load its content protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); camera = new FreeCamera(new Vector3(650, 650, 650), MathHelper.ToRadians(45), MathHelper.ToRadians(-30), GraphicsDevice); models.Add(new CModel(Content.Load <Model>("Content/windmill__cv1"), Vector3.Zero, Vector3.Zero, new Vector3(0.25f), GraphicsDevice)); anim = new ObjectAnimation(new Vector3(0, 875, 0), new Vector3(0, 875, 0), Vector3.Zero, new Vector3(0, 0, MathHelper.TwoPi), TimeSpan.FromSeconds(10), true); models.Add(new CModel(Content.Load <Model>("Content/Ground"), Vector3.Zero, Vector3.Zero, Vector3.One, GraphicsDevice, false)); foreach (ModelMesh mesh in models[0].Model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.Texture = Content.Load <Texture2D>("Content/windmill_diffuse"); effect.TextureEnabled = true; } } lastMouseState = Mouse.GetState(); }
// Called when the game should load its content protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); camera = new FreeCamera(new Vector3(650, 650, 650), MathHelper.ToRadians(45), MathHelper.ToRadians(-30), GraphicsDevice); models.Add(new CModel(Content.Load <Model>("Content/ship__cv1"), Vector3.Zero, Vector3.Zero, new Vector3(0.25f), GraphicsDevice)); anim = new ObjectAnimation(new Vector3(0, -150, 0), new Vector3(0, 150, 0), Vector3.Zero, new Vector3(0, -MathHelper.TwoPi, 0), TimeSpan.FromSeconds(10), true); lastMouseState = Mouse.GetState(); }