Esempio n. 1
0
    public void CheckOutline()
    {
        if (outlinerOptimizationCounter >= 10 && isOutlineCheckActive)
        {
            if (!BIWUtils.IsPointerOverUIElement() && !BIWUtils.IsPointerOverMaskElement(BIWSettings.GIZMOS_LAYER))
            {
                BIWEntity entity = raycastController.GetEntityOnPointer();
                RemoveEntitiesOutlineOutsidePointerOrUnselected();

                if (entity != null && !entity.IsSelected)
                {
                    OutlineEntity(entity);
                }
            }
            else
            {
                CancelUnselectedOutlines();
            }

            outlinerOptimizationCounter = 0;
        }
        else
        {
            outlinerOptimizationCounter++;
        }
    }
Esempio n. 2
0
    public virtual void MouseClickDetected()
    {
        BIWEntity entityToSelect = raycastController.GetEntityOnPointer();

        if (entityToSelect != null)
        {
            entityHandler.EntityClicked(entityToSelect);
        }
        else if (!isMultiSelectionActive)
        {
            entityHandler.DeselectEntities();
        }
    }
    public bool IsPointerInSelectedEntity()
    {
        BIWEntity entityInPointer = raycastController.GetEntityOnPointer();

        if (entityInPointer == null)
        {
            return(false);
        }

        foreach (BIWEntity entity in selectedEntities)
        {
            if (entityInPointer == entity)
            {
                return(true);
            }
        }

        return(false);
    }