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(); } }
void OnPanelExit(int handIndex) { PanelRange panelRange = ranges.Find(obj => obj.handIndex.Equals(handIndex)); if (panelRange != null) { panelRange.IsRangeUI = false; } }
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; } }