protected void SelectAction(bool isHit, RaycastHit hitInfo) { if (isHit == true) { hitTr = hitInfo.transform; if (isExtruding == false) { if (selectionState == SelectionState.Vertex) { hitPoint = hitTr.GetComponent<Point>(); if (hitPoint != null) { hitPoint.SetPointEnabled(true); } } if (selectionState == SelectionState.Face) { hitPrimitiveObject = hitTr.GetComponent<PrimitiveObject>(); if (hitPrimitiveObject != null && hitPrimitiveObject.IsSelected == false) { hitPrimitiveObject.SetColor(Color.red); } } else if (selectionState == SelectionState.Object) { hitPrimitiveObject = hitTr.GetComponent<PrimitiveObject>(); if (hitPrimitiveObject != null && hitPrimitiveObject.IsSelected == false) { hitPrimitiveObject.GetCompound().SetColor(Color.red); } } } } }
public void SetColor(Color c) { for (int i = 0; i < primObjectList.Count; i++) { PrimitiveObject po = primObjectList[i]; po.SetColor(c); } }