/// <summary> /// Hides this control, returning control and position to the controller /// </summary> public void Hide() { //Unzoom the view DetailZoom.ExitZoomDetail(); UI.SetActive(false); //Invoke the event OnHiddenEvent.Invoke(); bShown = false; }
public void ShowZoomDetail() { if (CurrentDetail != this) { //Lazy loading if (bPendingInitialization) { Initialize(); } //Close any open zoom detail that cannot be open when other one is if (CurrentDetail && CurrentDetail.CloseOnExternalActivation) { CurrentDetail.ExitZoomDetail(); } //Setup CurrentDetail = this; if (ExitTransform == null) { ExitPoint = new Trans(MyManager.Instance.playerGameObject.transform); } else { ExitPoint = new Trans(ExitTransform); } //Queue smooth transport _playerObject.SmoothTransport(new Trans(TargetPosition ? TargetPosition : gameObject.transform), EaseMoveTo.DefaultSmoothTime, null, !ShouldForceRotation); if (ZoomCanvas) { ZoomCanvas.SetActive(true); } if (OnShown != null) { OnShown.Invoke(); } } }
public void AbortExit() { ZoomDetail.ExitZoomDetail(); shouldWaitForConfirmation = true; }