Exemplo n.º 1
0
 public void QuickBarObjectSelected(int index)
 {
     if (quickBarShortcutsSceneObjects.Length > index && quickBarShortcutsSceneObjects[index] != null)
     {
         OnSceneObjectSelected?.Invoke(quickBarShortcutsSceneObjects[index]);
     }
 }
Exemplo n.º 2
0
    private void Awake()
    {
        toggleUIVisibilityInputAction.OnTriggered       += OnUIVisiblityToggleActionTriggered;
        toggleControlsVisibilityInputAction.OnTriggered += OnControlsToggleActionTriggered;

        toggleChangeCameraInputAction.OnTriggered   += OnChangeModeActionTriggered;
        toggleTranslateInputAction.OnTriggered      += OnTranslateActionTriggered;
        toggleRotateInputAction.OnTriggered         += OnRotateActionTriggered;
        toggleScaleInputAction.OnTriggered          += OnScaleActionTriggered;
        toggleResetInputAction.OnTriggered          += OnResetActionTriggered;
        toggleDuplicateInputAction.OnTriggered      += OnDuplicateActionTriggered;
        toggleDeleteInputAction.OnTriggered         += OnDeleteActionTriggered;
        toggleOpenEntityListInputAction.OnTriggered += OnEntityListActionTriggered;
        toggleSceneInfoInputAction.OnTriggered      += OnSceneLimitInfoControllerChangeVisibilityTriggered;
        toggleCatalogInputAction.OnTriggered        += OnSceneCatalogControllerChangeVisibilityTriggered;


        entityListBtn.onClick.AddListener(() => OnEntityListChangeVisibilityAction?.Invoke());

        foreach (Button closeEntityListBtn in closeEntityListBtns)
        {
            closeEntityListBtn.onClick.AddListener(() => OnEntityListChangeVisibilityAction?.Invoke());
        }


        catalogBtn.onClick.AddListener(() => OnSceneCatalogControllerChangeVisibilityAction?.Invoke());
        closeCatalogBtn.onClick.AddListener(() => OnSceneCatalogControllerChangeVisibilityAction?.Invoke());


        changeModeBtn.onClick.AddListener(() => OnChangeModeAction?.Invoke());
        firstPersonChangeModeBtn.onClick.AddListener(() => OnChangeModeAction?.Invoke());
        extraBtn.onClick.AddListener(() => OnExtraBtnsClick?.Invoke());
        controlsBtn.onClick.AddListener(() => OnControlsVisibilityAction?.Invoke());
        closeControlsBtn.onClick.AddListener(() => OnControlsVisibilityAction?.Invoke());
        hideUIBtn.onClick.AddListener(() => OnChangeUIVisbilityAction?.Invoke());

        translateBtn.onClick.AddListener(() => OnTranslateSelectionAction?.Invoke());
        rotateBtn.onClick.AddListener(() => OnRotateSelectionAction?.Invoke());
        scaleBtn.onClick.AddListener(() => OnScaleSelectionAction?.Invoke());
        resetBtn.onClick.AddListener(() => OnResetSelectedAction?.Invoke());
        duplicateBtn.onClick.AddListener(() => OnDuplicateSelectionAction?.Invoke());
        deleteBtn.onClick.AddListener(() => OnDeleteSelectionAction?.Invoke());

        sceneObjectCatalogController.OnSceneObjectSelected += (x) => OnSceneObjectSelected?.Invoke(x);
        catalogGroupListView.OnResumeInput += () => OnResumeInput?.Invoke();
        catalogGroupListView.OnStopInput   += () => OnStopInput?.Invoke();

        tutorialBtn.onClick.AddListener(() => OnTutorialAction?.Invoke());
        publishBtn.onClick.AddListener(() => OnPublishAction?.Invoke());
        logOutBtn.onClick.AddListener(() => OnLogoutAction?.Invoke());
    }
Exemplo n.º 3
0
 void SceneObjectSelected(SceneObject sceneObject)
 {
     OnSceneObjectSelected?.Invoke(sceneObject);
     SetVisibilityOfCatalog(false);
 }
 void SceneObjectSelected(SceneObject sceneObject)
 {
     OnSceneObjectSelected?.Invoke(sceneObject);
 }