Exemplo n.º 1
0
    public GUIFailureSummaryView ConcreteGUIFailureSummaryView(GUIGamePlayView gamePlayView)
    {
        GUIFailureSummaryView guiFailureSummaryViewInstance = Instantiate(_guiFailureSummaryViewPrefab);

        container.Inject(guiFailureSummaryViewInstance);
        return(guiFailureSummaryViewInstance);
    }
Exemplo n.º 2
0
    public void SwitchView()
    {
        switch (_currentGameStateService.CurrentGameState)
        {
        case CurrentGameStateService.GameStates.GamePlay:
            _guiGamePlayView = _viewFactory.ConcreteGUIGamePlayView();
            _guiGamePlayView.transform.SetParent(FindObjectOfType <ViewManager>().transform);
            break;

        case CurrentGameStateService.GameStates.SummarySuccess:
            _guiSuccessSummaryView = _viewFactory.ConcreteGUISuccessSummaryView(_guiGamePlayView);
            _guiSuccessSummaryView.transform.SetParent(FindObjectOfType <ViewManager>().transform);
            break;

        case CurrentGameStateService.GameStates.SummaryFailure:
            _guiFailureSummaryView = _viewFactory.ConcreteGUIFailureSummaryView(_guiGamePlayView);
            _guiFailureSummaryView.transform.SetParent(FindObjectOfType <ViewManager>().transform);
            break;
        }
    }