/// <summary> /// 取消选中 /// </summary> public void DeselectItem(DevInfoItem current = null) { if (current != null && current == this) { return; } else { if (TargetGraphic != null) { TargetGraphic.overrideSprite = Normal; } IsSelect = false; CurrentSelectItem = null; } }
/// <summary> /// 选中目标 /// </summary> public void SelectItem() { if (IsSelect) { return; } if (CurrentSelectItem != null) { CurrentSelectItem.DeselectItem(this); } IsSelect = true; CurrentSelectItem = this; if (TargetGraphic != null) { TargetGraphic.overrideSprite = Select; } if (SystemInfo != null) { Debug.Log("ShowSubSystem:" + SystemInfo.DevName); } }