예제 #1
0
        void OnReleaseObject(GameObject target, int handIndex)
        {
            //释放时,发送一次事件?

            if (!targetObjects.Contains(target))
            {
                return;
            }

            PanelRange panelRange = ranges.Find(obj => obj.handIndex.Equals(handIndex));

            if (panelRange == null)
            {
                return;
            }

            if (panelRange.IsRangeUI)
            {
                targetObjects.Remove(target);

                Destroy(target);

                if (maxCount != -1)
                {
                    maxCount++;
                    IsEnable = true;
                }
            }
            else
            {
                target.GetComponent <KGUI_ObjectFrontUI>().OnReset();
            }
        }
예제 #2
0
        void OnPanelExit(int handIndex)
        {
            PanelRange panelRange = ranges.Find(obj => obj.handIndex.Equals(handIndex));

            if (panelRange != null)
            {
                panelRange.IsRangeUI = false;
            }
        }
예제 #3
0
        void OnPanelEnter(int handIndex)
        {
            PanelRange panelRange = ranges.Find(obj => obj.handIndex.Equals(handIndex));

            if (panelRange == null)
            {
                panelRange = new PanelRange()
                {
                    handIndex = handIndex, IsRangeUI = true
                };
                ranges.Add(panelRange);
            }
            else
            {
                panelRange.IsRangeUI = true;
            }
        }