Пример #1
0
        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);
            }
        }
Пример #2
0
        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");
            }
        }
Пример #3
0
 private void Start()
 {
     currentActiveScreen = allGameScreens[0];
     currentActiveScreen.gameObject.SetActive(true);
 }