protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); spaceship = new GameModel(Content.Load <Model>("spaceship")) { Position = new Vector3(0, 400, 0), Scale = new Vector3(50f), BaseRotation = new Vector3(0, MathHelper.Pi, 0) } .SetEffect(Content.Load <Effect>("TextureMapper")); models.Add(spaceship); var ground = new GameModel(Content.Load <Model>("ground")) .SetEffect(Content.Load <Effect>("TextureMapper")); models.Add(ground); camera = new ChaseCamera( new Vector3(0, 400, 1500), new Vector3(0, 200, 0), new Vector3(0, 0, 0), GraphicsDevice); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); spaceship = new GameModel(Content.Load<Model>("spaceship")) { Position = new Vector3(0, 400, 0), Scale = new Vector3(50f), BaseRotation = new Vector3(0, MathHelper.Pi, 0) } .SetEffect(Content.Load<Effect>("TextureMapper")); models.Add(spaceship); var ground = new GameModel(Content.Load<Model>("ground")) .SetEffect(Content.Load<Effect>("TextureMapper")); models.Add(ground); camera = new ChaseCamera( new Vector3(0, 400, 1500), new Vector3(0, 200, 0), new Vector3(0, 0, 0), GraphicsDevice); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); var pointLightEffect = Content.Load <Effect>("PointLightEffect"); pointLightEffect.Parameters["LightColor"].SetValue(new Vector3(1f, 1f, 0.5f)); spaceship = new GameModel(Content.Load <Model>("spaceship")) { Position = new Vector3(0, 400, 2600), Scale = new Vector3(50f), BaseRotation = new Vector3(0, MathHelper.Pi, 0) } .SetEffect(pointLightEffect); models.Add(spaceship); var ground = new GameModel(Content.Load <Model>("ground")) .SetEffect(pointLightEffect, allowSpecular: false); models.Add(ground); camera = new ChaseCamera( new Vector3(0, 400, 1500), new Vector3(0, 200, 0), new Vector3(0, 0, 0), GraphicsDevice); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); var model = Content.Load <Model>("spaceship"); var effect = Content.Load <Effect>("DemoEffect1"); foreach (var mesh in model.Meshes) { foreach (var part in mesh.MeshParts) { part.Effect = effect.Clone(); } } spaceship = new GameModel(model) { Position = new Vector3(0, 400, 0), Scale = new Vector3(50f), BaseRotation = new Vector3(0, MathHelper.Pi, 0) }; models.Add(spaceship); models.Add(Content.Load <Model>("ground")); camera = new ChaseCamera( new Vector3(0, 400, 1500), new Vector3(0, 200, 0), new Vector3(0, 0, 0), GraphicsDevice); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); var pointLightEffect = Content.Load<Effect>("PointLightEffect"); pointLightEffect.Parameters["LightColor"].SetValue(new Vector3(1f, 1f, 0.5f)); spaceship = new GameModel(Content.Load<Model>("spaceship")) { Position = new Vector3(0, 400, 2600), Scale = new Vector3(50f), BaseRotation = new Vector3(0, MathHelper.Pi, 0) } .SetEffect(pointLightEffect); models.Add(spaceship); var ground = new GameModel(Content.Load<Model>("ground")) .SetEffect(pointLightEffect, allowSpecular: false); models.Add(ground); camera = new ChaseCamera( new Vector3(0, 400, 1500), new Vector3(0, 200, 0), new Vector3(0, 0, 0), GraphicsDevice); }
public Spaceship( Game game, GameModel model, Viewport viewport ) : base(game, model) { this.Camera = new ChaseCamera( new Vector3(0, 400, 1500), new Vector3(0, 200, 0), new Vector3(0, 0, 0), game.GraphicsDevice, model.Position, viewport); }