예제 #1
0
    private void Construct(IBuildSaveState _state,
                           [Inject(Id = "TextValidateOutput")] Text _validateOutputText,
                           [Inject(Id = "InputName")] InputField _inputNameField,
                           [Inject(Id = "ButtonSaveTrack")] Button _saveButton,
                           [Inject(Id = "ButtonCancel")] Button _cancelButton,
                           [Inject(Id = "ButtonShare")] Button _shareButton,
                           DialogBuilder.Factory _dialogBuilderFactory,
                           IBuildStateMachine _buildSM,
                           UpdateUseCase _useCase)
    {
        m_state   = _state;
        m_session = _buildSM;
        m_useCase = _useCase;
        m_fader   = GetComponent <UIFader> ();
        m_fader.RegisterStateCallbacks(( State )m_state);

        m_validateOutputText      = _validateOutputText;
        m_validateOutputText.text = "Please enter a name for the Track";
        m_inputNameField          = _inputNameField;
        m_inputNameField.onValueChanged.AddListener(OnValueChanged);
        m_inputNameField.text = "";
        m_saveButton          = _saveButton;
        m_saveButton.onClick.AddListener(OnSaveButtonPressed);
        m_saveButton.interactable = false;
        _cancelButton.onClick.AddListener(OnCancelButtonPressed);
        m_dialogBuilderFactory = _dialogBuilderFactory;
        _shareButton.onClick.AddListener(OnShareButtonPressed);

        gameObject.SetActive(false);
    }
예제 #2
0
    private void Construct(IBuildLoadState _state,
                           [Inject(Id = "Content")] RectTransform _contentRect,
                           [Inject(Id = "LoadButton")] Button _loadButton,
                           [Inject(Id = "CancelButton")] Button _cancelButton,
                           [Inject(Id = "RaceButton")] Button _raceButton,
                           Settings _settings)
    {
        m_selected = null;
        m_state    = _state;
        ((State)m_state).m_enteredState += LoadList;
        ((State)m_state).m_exitedState  += Unload;
        m_fader = GetComponent <UIFader> ();
        m_fader.RegisterStateCallbacks((State)m_state);

        m_contentRect             = _contentRect;
        m_loadButton              = _loadButton;
        m_loadButton.interactable = false;
        m_loadButton.onClick.AddListener(OnEditPressed);
        _cancelButton.onClick.AddListener(OnCancelPressed);
        m_raceButton = _raceButton;
        m_raceButton.interactable = false;
        m_raceButton.onClick.AddListener(OnRacePressed);
        m_settings = _settings;

        gameObject.SetActive(false);
    }
예제 #3
0
    private void Construct(ICalibrateState _state,
                           ARPlaneManager _planeManager,
                           ARPointCloudManager _pointCloudManager,
                           Settings _settings,
                           DialogBuilder.Factory _dialogBuilderFactory)
    {
        m_state                = _state;
        m_settings             = _settings;
        m_planeManager         = _planeManager;
        m_pointCloudManager    = _pointCloudManager;
        m_dialogBuilderFactory = _dialogBuilderFactory;

        UIFader fader = GetComponent <UIFader> ();

        fader.RegisterStateCallbacks((State)_state);
        ((State)_state).m_enteredState += Reset;

        m_planeSatisfaction = new ReactiveProperty <int> ();
        m_pointSatisfaction = new ReactiveProperty <int> ();

        m_resetButton.onClick.AddListener(Reset);
        m_skipButton.onClick.AddListener(OnSkipButtonPressed);

        gameObject.SetActive(false);
    }
예제 #4
0
    private void Construct(IRaceOverState _state)
    {
        m_state = _state;

        // Listen for state events
        m_fader = GetComponent <UIFader> ();
        m_fader.RegisterStateCallbacks((State)m_state);

        // turn off this gameobject in case it is active
        gameObject.SetActive(false);
    }
예제 #5
0
 private void Construct(IBuildEditorState _state,
                        [Inject(Id = "TrackParent")] ISplineManager _splineMgr,
                        [Inject(Id = "TrackParent")] StreetView _streetView,
                        DialogBuilder.Factory _dialogBuilderFactory)
 {
     m_state = _state;
     m_fader = GetComponent <UIFader> ();
     m_fader.RegisterStateCallbacks(( State )m_state);
     gameObject.SetActive(false);
     m_streetView           = _streetView;
     m_dialogBuilderFactory = _dialogBuilderFactory;
 }
예제 #6
0
    private void Construct(IRaceSetupState _state, Settings _settings)
    {
        m_state    = _state;
        m_settings = _settings;
        m_startButton.onClick.AddListener(StartAbortButtonPressed);

        // Listen for state events
        m_fader = GetComponent <UIFader> ();
        m_fader.RegisterStateCallbacks((State)m_state);

        // turn off this gameobject in case it is active
        gameObject.SetActive(false);
    }
예제 #7
0
    private void Construct(IBuildObserveState _state,
                           DialogBuilder.Factory _dialogBuilderFactory)
    {
        m_state = _state;
        m_dialogBuilderFactory = _dialogBuilderFactory;

        m_backButton.onClick.AddListener(OnBackButtonPressed);
        m_editCopyButton.onClick.AddListener(OnEditCopyButtonPressed);
        m_raceButton.onClick.AddListener(OnRaceButtonPressed);

        UIFader fader = GetComponent <UIFader> ();

        fader.RegisterStateCallbacks((State)m_state);
        gameObject.SetActive(false);
    }
예제 #8
0
    private void Construct(RaceManager _raceManager,
                           IRaceSetupState raceSetupState,
                           IRacingState _racingState,
                           IRaceOverState _raceOverState)
    {
        m_raceManager = _raceManager;
        m_racingState = _racingState;

        UIFader fader = GetComponent <UIFader> ();

        fader.RegisterStateCallbacks(
            (State)_racingState,
            (State)_raceOverState);
        ((State)raceSetupState).m_enteredState += fader.Deactivate;

        gameObject.SetActive(false);
    }