public void ChangeView(MainMenuCameraView newView) { if (!transitioning) { transitioning = !transitioning; MainMenuView fromView = CurrentView; MainMenuView toView = GetView(newView); cameraLerp.Seed(fromView.CameraAnchor, toView.CameraAnchor, toView.TransitionToTime); if (newView == MainMenuCameraView.Scout) { SetSelectedLocation(null); } fromView.BeforeTransitionAway(); ToggleLogoAndCamera(fromView, toView, () => { CurrentView = toView; CurrentView.AfterTransitionTo(); ViewState = newView; //if (newView == MainMenuCameraView.Supply) //{ // //unselect all radio buttons // InitializeRadioButtons(); // QuickstartBackdrop.gameObject.SetActive(true); //} }); } }
private MainMenuView GetView(MainMenuCameraView viewState) { switch (viewState) { case MainMenuCameraView.Scout: return(ScoutView); case MainMenuCameraView.Supply: return(FinanceAndSupplyView); case MainMenuCameraView.Quickstart: return(QuickstartView); default: return(TitleView); } }