private IEnumerator InTransition(bool fade, bool cameraSetting, CellTransitionDestination entrance, bool resetParallax = false) { m_Transitioning = true; Publisher.Instance.GainOrReleaseControl(false); if (fade) { yield return(ScreenFader.FadeSceneOut()); } Publisher.Instance.SetAnimState(true, false); Publisher.Instance.SetObservers(true, true, entrance.locations); cellController.CurrentCell.ResetCell(false); if (cameraSetting) { cellController.SetCell(rootCell, initalCellTransitionDestinationTag); if (cellController.PreviousCell != rootCell) { cellController.DisablePreviousCell(); } screenManager.autoCameraSetup.SetMainConfinerBound(rootCell.confinerCollider); } if (resetParallax) { parallaxScroller.Initialize(); } UIManager.Instance.TimerUI.ResetTimer(); if (fade) { yield return(ScreenFader.FadeSceneIn()); } Publisher.Instance.GainOrReleaseControl(true); UIManager.Instance.TimerUI.StartTimer(); m_Transitioning = false; }
public void GetCellDestination(CellTransitionDestination.DestinationTag destinationTag, out CellTransitionDestination cellTransitionDestination) { for (int i = 0; i < cellTransitionDestinations.Length; i++) { if (cellTransitionDestinations[i].destinationTag == destinationTag) { cellTransitionDestination = cellTransitionDestinations[i]; return; } } cellTransitionDestination = null; Debug.LogError("해당 목적지가 현재 셀에 없습니다"); }