Пример #1
0
        /*--------------------------------------------------------------------------------------------*/
        public void Update()
        {
            HoverItemsManager itemsMan = GetComponent <HoverItemsManager>();

            itemsMan.FillListWithExistingItemComponents(vHighStates);
            CalcNearestRaycastResults();
        }
Пример #2
0
        /*--------------------------------------------------------------------------------------------*/
        public void Update()
        {
            HoverItemsManager itemsMan = GetComponent <HoverItemsManager>();

            itemsMan.FillListWithExistingItemComponents(vHighStates);
            ResetItems();
            UpdateItems();
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Awake()
        {
            vItemsBuffer = new List <HoverItem>();

            HoverItemsManager itemsMan = GetComponent <HoverItemsManager>();

            itemsMan.OnItemListInitialized.AddListener(AddAllItemListeners);
            itemsMan.OnItemAdded.AddListener(AddItemListeners);
            itemsMan.OnItemRemoved.AddListener(RemoveItemListeners);
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        private void AddAllItemListeners()
        {
            HoverItemsManager itemsMan = GetComponent <HoverItemsManager>();

            itemsMan.FillListWithAllItems(vItemsBuffer, false);

            for (int i = 0; i < vItemsBuffer.Count; i++)
            {
                AddItemListeners(vItemsBuffer[i]);
            }
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        private void DeselectRemainingRadioGroupMembers(IItemDataRadio pRadioData)
        {
            HoverItemsManager itemsMan = GetComponent <HoverItemsManager>();
            string            groupId  = pRadioData.GroupId;

            Func <HoverItem, bool> filter = (tryItem => {
                IItemDataRadio match = (tryItem.Data as IItemDataRadio);
                return(match != null && match != pRadioData && match.GroupId == groupId);
            });

            itemsMan.FillListWithMatchingItems(vItemsBuffer, false, filter);

            for (int i = 0; i < vItemsBuffer.Count; i++)
            {
                ((IItemDataRadio)vItemsBuffer[i].Data).Value = false;
            }
        }