public HowToPlayView CreateConcreteHowToPlayView() { HowToPlayView howToPlayView = Instantiate(_howToPlayView); container.Inject(howToPlayView); return(howToPlayView); }
public void SwitchView() { switch (_menuScreensService.MenuStates) { case MenuScreensService.MenuScreens.Login: LoginView loginView = _menuFactory.CreateConcreteLoginView(); loginView.transform.SetParent(gameObject.transform); loginView.OnLoginViewSetDel = SetState; // nie korzysta z DelegateService, jego delegat jest nieco inny od pozostaĆych break; case MenuScreensService.MenuScreens.MainMenu: MainLobbyView mainLobbyView = _menuFactory.CreateConcreteMainLobbyView(); mainLobbyView.transform.SetParent(gameObject.transform); _delegateService.OnStateSetDel = SetState; break; case MenuScreensService.MenuScreens.HowtoPlay: HowToPlayView howToPlay = _menuFactory.CreateConcreteHowToPlayView(); howToPlay.transform.SetParent(gameObject.transform); _delegateService.OnStateSetDel = SetState; break; case MenuScreensService.MenuScreens.Credits: CreditsView creditsView = _menuFactory.CreateConcreteCreditsView(); creditsView.transform.SetParent(gameObject.transform); _delegateService.OnStateSetDel = SetState; break; case MenuScreensService.MenuScreens.Achievements: AchievementsView achievementsView = _menuFactory.CreateConcreteAchievementsView(); achievementsView.transform.SetParent(gameObject.transform); _delegateService.OnStateSetDel = SetState; break; case MenuScreensService.MenuScreens.Profile: ProfileView profileView = _menuFactory.CreateConcreteProfileView(); profileView.transform.SetParent(gameObject.transform); _delegateService.OnStateSetDel = SetState; break; case MenuScreensService.MenuScreens.NewGame: SceneManager.LoadScene("Game"); break; } }