/// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. protected override void Initialize() { CameraCue camCue = new CameraCue(new Vector3(0, 2, 23), new Vector3(0, 0, -1), 0); Matrix proj = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45), (float)settings.Default.ScreenWidth / (float)settings.Default.ScreenHeight, 0.1f, 100.0f); camera = new DollyCam(camCue, proj); BuildCamPath(); player = new Player(); world = Matrix.CreateTranslation(0f, 0f, 0f); world *= Matrix.CreateScale(new Vector3(0.8f, 0.8f, 0.5f)) * Matrix.CreateRotationX(-(float)Math.PI / 2.0f); level = Content.Load<Model>("Models/Level/level1"); base.Initialize(); }
/// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. protected override void Initialize() { CameraCue camCue = new CameraCue(new Vector3(0, 2, 23), new Vector3(0, 0, -1), 0); Matrix proj = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45), (float)settings.Default.ScreenWidth / (float)settings.Default.ScreenHeight, 0.1f, 100.0f); camera = new DollyCam(camCue, proj); BuildCamPath(); player = new Player(); world = Matrix.CreateTranslation(0f, 0f, 0f); world *= Matrix.CreateScale(new Vector3(0.8f, 0.8f, 0.5f)) * Matrix.CreateRotationX(-(float)Math.PI / 2.0f); level = Content.Load <Model>("Models/Level/level1"); base.Initialize(); }