public BaseScreen GetAnyBaseScreen(ScreenType screenType) { BaseScreen screenToReturn = Array.Find(allGameScreens, x => x.screenType.Equals(screenType)); if (screenToReturn != null) { return(screenToReturn); } else { Debug.LogFormat("screenType Does not Exist or Screen type set to None or Add in Screen to ScreenService"); return(null); } }
public void ChangeToScreen(ScreenType screenType) { BaseScreen screenToShow = Array.Find(allGameScreens, x => x.screenType.Equals(screenType)); if (screenToShow != null) { currentActiveScreen.gameObject.SetActive(false); currentActiveScreen = screenToShow; currentActiveScreen.gameObject.SetActive(true); } else { Debug.LogFormat("screenType Does not Exist or Screen type set to None or Add in Screen to ScreenService"); } }
private void Start() { currentActiveScreen = allGameScreens[0]; currentActiveScreen.gameObject.SetActive(true); }