private IEnumerator DisplaySequence(UIDisplay uiDisplay) { HideAll(); DecideIfShowTransition(uiDisplay); var timer = 0.0f; while (timer < HidingTime) { yield return(null); timer += Time.deltaTime; } HideAllInstantly(); uiGroups.TryGetValue(uiDisplay, out currentUIGroup); Assert.IsNotNull(currentUIGroup, "UIGroup not found:" + uiDisplay + " currentUIGroup:" + currentUIGroup); currentUIGroup.Show(); // Level loading does not put away the transition, it is put away by the gameplay PutAwayTransition(); yield return(new WaitForSeconds(0.5f)); if (uiDisplay == UIDisplay.MainMenu) { // don't do this until the screen is covered with the transition CoreGameControl.DisableGameRenderers(); CoreConnector.CameraControl.DisableGameCamera(); CoreConnector.CameraControl.DisableVisuals(); } }
public static void UpdateMainLoop() { CoreGameControl.ManageControls(); CoreConnector.CoreGameControl.SetWorldSidePositionToMatchPlayer(); CoreConnector.Player.ManageGamePlay(); CoreConnector.Levels.UpdateLoop(); }
public static void LateUpdateMainLoop() { var lastPos = CoreConnector.Player.GetCurrentPosition(); // this is where the tunnel effect will go, constantly animating // rotate the camera down CoreConnector.CameraControl.AngleCameraForLevelComplete(); // now move the player around CoreGameControl.ManageControls(); var pos = CoreConnector.GameInput.GetShipPosition(); CoreConnector.Player.MoveToTargetPosition(pos); CoreConnector.GameInput.PositionShipWithDisplayOffset(); // add rotation to the players model CoreConnector.GameInput.differenceInMovement = lastPos - pos; CoreConnector.Player.ManageAndDisplayPlayerRotation(); }