//Add a transition to the cue list public void AddCue(CameraCue cue) { if (cues.Count == 0) { arrived = false; } cues.Add(cue); }
//Constructor for dollycam public DollyCam(CameraCue cue, Matrix project) { this.currentCue = cue; this.project = project; cues = new List<CameraCue>(); arrived = true; waitElapsed = 0; UpdateView(); }
//Constructor for dollycam public DollyCam(CameraCue cue, Matrix project) { this.currentCue = cue; this.project = project; cues = new List <CameraCue>(); arrived = true; waitElapsed = 0; UpdateView(); }
/// 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(); }
//Set the camera cue to transition too and the speed to do it at public void TransitionTo(CameraCue nextCue) { cues.Insert(0, nextCue); arrived = false; }
//Add a transition to the cue list public void AddCue(CameraCue cue) { if (cues.Count == 0) arrived = false; cues.Add(cue); }