Ejemplo n.º 1
0
    public bool SelectEntity(DCLBuilderInWorldEntity entityEditable)
    {
        if (entityEditable.IsLocked)
        {
            return(false);
        }

        if (entityEditable.IsSelected)
        {
            return(false);
        }

        entityEditable.Select();

        selectedEntities.Add(entityEditable);

        currentActiveMode?.SelectedEntity(entityEditable);

        if (HUDController.i.builderInWorldMainHud != null)
        {
            hudController.UpdateEntitiesSelection(selectedEntities.Count);
            hudController.ShowEntityInformation();
            hudController.EntityInformationSetEntity(entityEditable, sceneToEdit);
        }

        outlinerController.CancelAllOutlines();

        OnEntitySelected?.Invoke();

        return(true);
    }
Ejemplo n.º 2
0
        public void ShowEntityInformationCorrectly()
        {
            // Act
            buildModeHUDController.ShowEntityInformation();

            // Assert
            buildModeHUDController.controllers.entityInformationController.Received(1).Enable();
        }
        public void ShowEntityInformationCorrectly(bool activateTransparencyMode)
        {
            // Act
            buildModeHUDController.ShowEntityInformation(activateTransparencyMode);

            // Assert
            buildModeHUDController.controllers.entityInformationController.Received(1).Enable();
            buildModeHUDController.controllers.entityInformationController.Received(1).SetTransparencyMode(activateTransparencyMode);
            buildModeHUDController.controllers.sceneCatalogController.Received(1).CloseCatalog();
            buildModeHUDController.controllers.tooltipController.Received(1).HideTooltip();

            if (activateTransparencyMode)
            {
                buildModeHUDController.controllers.catalogBtnController.Received(1).SetActive(false);
            }
        }