public override void Update(GameTime gameTime) { EvaluateMouseCamControls(gameTime); Vector3 upVector = duneBuggyOne.BuggyObject.Transform.AbsoluteTransform.Translation - earth.Transform.AbsoluteTransform.Translation; Vector3 lengthVector = spaceShipOne.ShipObject.Transform.AbsoluteTransform.Translation - earth.Transform.AbsoluteTransform.Translation;; if (upVector != Vector3.Zero) { upVector.Normalize(); } duneBuggyOne.Update(gameTime); spaceShipOne.Update(gameTime, (lengthVector.Length() < (earth.radius * 1.05f))); duneBuggyCamera.Update(gameTime, earth, PlayerIndex.One); spaceShipCamera.Update(gameTime); PlanetBuilder.Update(); earth.Update(gameTime); if (input.EvaluateInputBinding("MainMenu")) { SystemCore.ScreenManager.AddAndSetActive(new MainMenuScreen()); } base.Update(gameTime); }
public override void Update(GameTime gameTime) { EvaluateMouseCamControls(gameTime); duneBuggyOne.Update(gameTime); if (input.EvaluateInputBinding("MainMenu")) SystemCore.ScreenManager.AddAndSetActive(new MainMenuScreen()); base.Update(gameTime); }