private void OnEnable() { if (_group is null) { return; } StartCoroutine(TweenUtil.AnimateFloat(0f, 1, 0.5f, x => _group.alpha = x)); }
private IEnumerator CloseContent(float transitionTime) { contentContainer.gameObject.SetActive(false); contentCamera.gameObject.SetActive(false); dimensionMenu.gameObject.SetActive(false); var rect = mainCamera.rect; StartCoroutine(TweenUtil.AnimateFloat(rect.width, 1f, transitionTime, v => { rect.width = v; mainCamera.rect = rect; })); var transposer = mainVirtualCamera.GetCinemachineComponent <CinemachineTransposer>(); var startOffset = transposer.m_FollowOffset; var endOffset = startOffset + Vector3.forward * 3 + Vector3.down * 2; yield return(StartCoroutine(TweenUtil.AnimateVector(startOffset, endOffset, transitionTime, v => transposer.m_FollowOffset = v))); _zoomedIn = true; }