public void Move() { int index = dropdown.value - 1; if (m_CellNames.Contains(cellController.CellCache[index].name)) { if (cellController.CellCache[index] == cellController.CurrentCell) { return; } cellController.SetCell(cellController.CellCache[index], CellTransitionDestination.DestinationTag.A); screenManager.autoCameraSetup.SetMainConfinerBound(cellController.CurrentCell.confinerCollider); Publisher.Instance.SetObservers(false, true, cellController.LastEnteringDestination.locations); cellController.DisablePreviousCell(); } }
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; }