void FixedUpdate() { if (eventSystem.currentSelectedGameObject != null) { return; } if (focusCommand.Activated) { lastFocusedObject = focusCommand.FocusedObject; focusCommand.PerformInterpolatedFocus( transform, focusCommand.FocusedObject, Time.fixedDeltaTime ); return; } else if (orbitCommand.Activated) { orbitCommand.PerformOrbit( transform, getOrbitingPoint(), Time.fixedDeltaTime ); return; } else if (zoomCommand.Activated) { zoomCommand.PerformZoom( transform, Time.fixedDeltaTime ); } else if (lookCommand.Activated) { lookCommand.PerformLook( transform, Time.fixedDeltaTime ); } else if (sideMovementCommand.Activated) { sideMovementCommand.PerformSideMovement( transform, Time.fixedDeltaTime ); } else { return; } lastFocusedObject = null; //Loses focus if necessarily do anything other than Orbit or Focus an object. }
void Update() { if (eventSystem.currentSelectedGameObject != null) { return; } if (lookCommand.Activated) { lookCommand.PerformLook( transform, Time.deltaTime ); } }