private void InitializeObjects() { Grass = new Grass(new Vector3(0f, 0f, 0f)); float deg5 = MathHelper.ToRadians(5); float deg10 = MathHelper.ToRadians(10); float deg15 = MathHelper.ToRadians(15); float deg90 = MathHelper.ToRadians(90); float deg180 = MathHelper.ToRadians(180); AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(100f, 270f, -400f), 0f, 0f, "one", 550f)); AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(500f, 250f, 600f), 0f, -deg90, "two", 800f)); AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(150f, 300f, -100f), deg5, deg180 * 0.9f, "three", 600f)); AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(-200f, 150f, 105f), 0f, deg180 * 0.4f, "four", 500f)); AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(-200f, 100f, -120f), 0.0f, deg180 * 0.7f, "five", 400f)); AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(-50f, 280f, 190f), deg5, deg180 * 0.3f, "six", 600f)); AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(400f, 250f, 200f), 0f, deg180, "seven", 600f)); AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(400f, 250f, 350f), 0f, deg180 , "eight", 600f)); //AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(600f, 500f, 0f), 0f, deg15, "nine", 500f, fuel: 1150f)); //AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(500f, 300f, 0f), 0f, -deg90 * 0.9f, "ten", 800f)); //AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(150f, 700f, 800f), -deg10, -deg90 * 0.6f, "eleven", 600f)); //AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(-100f, 400f, 105f), 0f, -deg90 * 0.8f, "twelve", 500f)); //AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(-500f, 360f, -600f), 0.0f, -deg90 * 0.65f, "thirteen", 550f)); //AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(-500f, 320f, 700f), 0.0f, deg180 *0.7f, "fourteen", 600f)); //AirplaneController.Create(new Airplane(Display.Graphics.GraphicsDevice, new Vector3(700f, 400f, 700f), 0f, deg90 * 0.5f, "fifteen", 500f)); }
public void LoadDisplay(Grass grass, SpriteFont sprFont) { Grass = grass; SprFont = sprFont; SpriteBatch = new SpriteBatch(Graphics.GraphicsDevice); Graphics.GraphicsDevice.DepthStencilState = DepthStencilState.Default; AspectRatio = Graphics.GraphicsDevice.Viewport.AspectRatio; DisplayController.CreateProjectionMatrix(AspectRatio); }